Implement 0009 deep-standby SoC rail, RPM handoff, USB PHY, Wi-Fi BET, and drm_mipi_dbi fixes

- Enable CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y and lower 200 MHz CPU OPP opp-peak-kBps to 0x25800 (19.2 MHz BIMC XO floor) across all six MSM8905/MSM8909 DTS files so rpmpd_sync_state and icc_sync_state complete despite driverless /cpus nodes.
- Add patches/kernel/0009-msm8909-deep-standby-rpm-usb-wifi-ddr.patch: late_initcall_sync(rpm_smd_clk_late_cleanup) to drop active votes on unclaimed QDSS/QPIC clocks and clear RPM SLEEP_STATE boot handoff votes, ChipIdea ci_hdrc_msm/core unplugged USB HS PHY shutdown + 200 ms autosuspend, and wcn36xx BET + multicast filter + HOST_SUSPEND_IND/HOST_RESUME_REQ in screen_off_offload.
- Build and export drivers/gpu/drm/drm_mipi_dbi.ko.zst alongside panel-mipi-dbi.ko.zst in build-kernel-audio.sh, rebuild-image.sh, apply-bananarchy-overlay.sh, and check-rebuild.sh.
- Rebuild and verify a1114 (carbonara) images/archives for nokia-argon and nokia-beatles and update BATTERY-OPTIMIZATION-ANALYSIS.md, CHANGELOG.md, and pinned hashes in check-rebuild.sh.
This commit is contained in:
Luxferre committed 2026-11-13 09:08:24 +02:00
1 parent b2cf028808
commit 96c66bf0c6
37 files changed
+47187 -46641

No files matched your search

+25 -11
View File
@@ -372,9 +372,9 @@ fi
echo "[check] Known-good flashable image set..."
for pair in \
"76da5b9d9ed555ebebe76ba79222ef4211c1a4c50437755f0abdbcc0c99449d4 images/bananarchy-nokia-argon.img" \
"81d62838c2a105dfaf339a6e71016e215e8e68e8857eb46d3a24fe2fd691cce7 images/bananarchy-nokia-beatles.img" \
"4e16742bc1c2461cd6a63f15009a2c0a8550dae7adf7f1ab83209d3df21726ae images/boot-bananarchy-nokia-beatles.img" \
"f4c8921a674944b2687b2d7bcb52e6f3cb81ad5997fddac969949305c0479c60 images/bananarchy-nokia-argon.img" \
"fd29593b30008b65b7b30b867824ce3f3f4e1f70cda4f012dde1a2c14dd316ba images/bananarchy-nokia-beatles.img" \
"d6cb9d5f13bc00815c4fcde5cf32b92ce9d7873683d3cec8b1346a53801ea08a images/boot-bananarchy-nokia-beatles.img" \
"b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d images/boot-lk2nd-nokia-beatles-display.img"; do
set -- $pair
want=$1
@@ -1148,22 +1148,32 @@ if ! grep -qF '/etc/bananarchy-no-deep-standby' \
fi
if [ ! -f "$BASE_DIR/patches/kernel/0008-msm8909-standby-power-icc-wifi-usb-panel.patch" ] || \
! grep -qF '0008-msm8909-standby-power-icc-wifi-usb-panel.patch' "$BASE_DIR/scripts/build-kernel-audio.sh" || \
[ ! -f "$BASE_DIR/patches/kernel/0009-msm8909-deep-standby-rpm-usb-wifi-ddr.patch" ] || \
! grep -qF '0009-msm8909-deep-standby-rpm-usb-wifi-ddr.patch' "$BASE_DIR/scripts/build-kernel-audio.sh" || \
! grep -qF 'M=drivers/gpu/drm drm_mipi_dbi.ko' "$BASE_DIR/scripts/build-kernel-audio.sh" || \
! grep -qF 'M=drivers/gpu/drm/tiny modules' "$BASE_DIR/scripts/build-kernel-audio.sh" || \
! grep -qF 'drm_mipi_dbi.ko.zst' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh" || \
! grep -qF 'panel-mipi-dbi.ko.zst' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
fail "deep-standby kernel patch 0008 or panel-mipi-dbi module build/install wiring is missing"
fail "deep-standby kernel patches 0008/0009 or MIPI DBI module build/install wiring is missing"
fi
if [ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/drm/panel-mipi-dbi.ko.zst" ] || \
if [ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/drm/drm_mipi_dbi.ko.zst" ] || \
[ ! -f "$BASE_DIR/overlay/rootfs/lib/modules/6.12.1-msm8916/kernel/drivers/gpu/drm/drm_mipi_dbi.ko.zst" ] || \
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/drm/panel-mipi-dbi.ko.zst" ] || \
[ ! -f "$BASE_DIR/overlay/rootfs/lib/modules/6.12.1-msm8916/kernel/drivers/gpu/drm/tiny/panel-mipi-dbi.ko.zst" ]; then
fail "prebuilt or overlay panel-mipi-dbi.ko.zst artifact is missing"
fail "prebuilt or overlay drm_mipi_dbi.ko.zst / panel-mipi-dbi.ko.zst artifact is missing"
fi
for kopt in CONFIG_INTERCONNECT_QCOM=y CONFIG_INTERCONNECT_QCOM_MSM8909=y CONFIG_INTERCONNECT_QCOM_SMD_RPM=y; do
for kopt in CONFIG_INTERCONNECT_QCOM=y CONFIG_INTERCONNECT_QCOM_MSM8909=y CONFIG_INTERCONNECT_QCOM_SMD_RPM=y CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y; do
if ! grep -qxF "$kopt" "$BASE_DIR/patches/kernel/config-bananarchy-msm8909.armv7"; then
fail "kernel config is missing $kopt"
fi
done
if ! grep -qxF 'CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y' "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/kernel-config"; then
fail "prebuilt kernel-config is missing CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y"
fi
if ! grep -q ' qcom_icc_rpm_set$' "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/System.map" || \
! grep -q ' ci_hdrc_msm_runtime_suspend$' "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/System.map"; then
fail "shipped kernel System.map is missing interconnect or ChipIdea USB runtime PM symbols"
! grep -q ' ci_hdrc_msm_runtime_suspend$' "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/System.map" || \
! grep -q ' rpm_smd_clk_late_cleanup$' "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/System.map"; then
fail "shipped kernel System.map is missing interconnect, ChipIdea USB runtime PM, or RPM clock cleanup symbols"
fi
if command -v modinfo >/dev/null 2>&1; then
if ! modinfo "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/wcn36xx/wcn36xx.ko.zst" 2>/dev/null | \
@@ -1171,6 +1181,10 @@ if command -v modinfo >/dev/null 2>&1; then
fail "prebuilt wcn36xx.ko.zst is missing the screen_off_offload parameter"
fi
fi
if ! zstd -dc "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/wcn36xx/wcn36xx.ko.zst" 2>/dev/null | \
strings | grep -qF 'wcn36xx_smd_wlan_host_suspend_ind'; then
fail "prebuilt wcn36xx.ko.zst is missing wcn36xx_smd_wlan_host_suspend_ind"
fi
for dts in \
"$BASE_DIR/devices/nokia-argon/qcom-msm8905-nokia-argon.dts" \
"$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts" \
@@ -1182,8 +1196,8 @@ for dts in \
! grep -qF 'qcom,msm8909-pcnoc' "$dts" || \
! grep -qF 'qcom,msm8909-snoc' "$dts" || \
! grep -qF 'interconnects = <0xa0 0x00 0xa0 0x06>;' "$dts" || \
! grep -qF 'opp-peak-kBps' "$dts"; then
fail "${dts#"$BASE_DIR/"} is missing MSM8909 interconnect/OPP bandwidth nodes"
! grep -qF 'opp-peak-kBps = <0x25800>;' "$dts"; then
fail "${dts#"$BASE_DIR/"} is missing MSM8909 interconnect/OPP bandwidth nodes or 0x25800 floor"
fi
done
if ! grep -qxF 'MODEM_DRX_MODE=6' "$BASE_DIR/overlay/rootfs/etc/bananarchy-power-policy.conf" || \