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:
1 parent
b2cf028808
commit
96c66bf0c6
37 files changed
+47187
-46641
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Bananarchy battery-usage optimization analysis (measurement-corrected)
|
||||
|
||||
**Status:** analysis plus implemented changes (sections 15-20).
|
||||
**Status:** analysis plus implemented changes (sections 15-21).
|
||||
**Project:** `/home/lux/proj/bananarchy`, current release `a1111` / `lennon`.
|
||||
**Device:** Nokia 8110 4G (`nokia-argon`, MSM8905), connected over USB RNDIS at `172.16.42.1`,
|
||||
`Linux nokia-argon 6.12.1-msm8916 #6 SMP PREEMPT Sat May 30 08:38:37 UTC 2026 armv7l`,
|
||||
@@ -1334,3 +1334,85 @@ find modem` when sending USSD queries on SIM 1:
|
||||
over `AF_QIPCRTR` (`QMI_SERVICE_VOICE = 9`, `sub = 0`) for the primary SIM
|
||||
just like `sub = 1` on the secondary SIM, preserving interactive multi-step
|
||||
`/tmp/sxmo_ussd_session_state` sessions even if `ModemManager` is unavailable.
|
||||
|
||||
---
|
||||
|
||||
## 21. Deep-standby SoC rail, RPM handoff, USB HS PHY, WCN3620 BET/host-suspend, and MIPI DBI reset fixes (`0009`)
|
||||
|
||||
Live benchmarking after `0008` improved screen-off DSDS + Wi-Fi standby from
|
||||
`-20% / 4h` to `-40% / 8h` (`5.0%/h`), still well above stock KaiOS because five
|
||||
kernel/build gaps kept SoC rails, RPM sleep votes, USB PHY regulators, WCN3620
|
||||
beacon wakeups, and stale `drm_mipi_dbi.ko` active:
|
||||
|
||||
### 21.1 Five remaining standby root causes found after `0008`
|
||||
|
||||
1. **`fw_devlink` `sync_state` deadlock on driverless `/cpus/cpu@0..3` + 100 MHz
|
||||
BIMC floor (`~30-50 mA`)**: `CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT` was unset in
|
||||
`patches/kernel/config-bananarchy-msm8909.armv7`. Because `/cpus/cpu@0..3`
|
||||
carry `qcom,msm8909-bimc` interconnect suppliers and `cpufreq-dt` does not
|
||||
bind CPU platform devices via `fw_devlink`, `fw_devlink_probing_done()`
|
||||
never completed. Consequently, `rpmpd_sync_state()` never fired (leaving
|
||||
`VDD_CX` and `VDD_MX` pinned at `SUPER_TURBO` from boot), and `icc_sync_state()`
|
||||
(`qnoc_sync_state`) never cleared RPM's `INT_MAX` bus floor. In addition, the
|
||||
200 MHz idle CPU OPP (`opp-199999951`) requested `opp-peak-kBps = <0xc3500>`
|
||||
(`800,000` kBps = `100 MHz` BIMC) instead of `<0x25800>` (`153,600` kBps =
|
||||
`19.2 MHz` XO floor).
|
||||
2. **Unclaimed `clk-smd-rpm` active and sleep-set handoff votes (`~10-20 mA`)**:
|
||||
`rpm_smd_clk_probe()` (`drivers/clk/qcom/clk-smd-rpm.c`) wrote `INT_MAX`
|
||||
boot-handoff rates to both `QCOM_SMD_RPM_ACTIVE_STATE` and
|
||||
`QCOM_SMD_RPM_SLEEP_STATE`. Unclaimed clocks such as `qdss_clk` / `qdss_a_clk`
|
||||
and `qpic_clk` / `qpic_a_clk` kept `ACTIVE_STATE` votes alive indefinitely,
|
||||
and all unclaimed RPM clocks kept `SLEEP_STATE` handoff votes (`INT_MAX` or `1`)
|
||||
preventing RPM sleep-set collapse.
|
||||
3. **Unplugged ChipIdea USB HS PHY staying powered (`~5-10 mA`)**:
|
||||
`ci_hdrc_msm_probe()` lacked `pm_runtime_set_autosuspend_delay` /
|
||||
`pm_runtime_use_autosuspend` and never shut down the ULPI `phy-qcom-usb-hs`
|
||||
on runtime suspend when unplugged (`vbus_extcon` disconnected), leaving
|
||||
`pm8909_l13` (`3.075 V`), `pm8909_l7` (`1.8 V`), `xo`, and PHY clocks on.
|
||||
Meanwhile `ci_hdrc_probe()` did not enable runtime autosuspend on the child
|
||||
`ci_hdrc` device when `CI_HDRC_SUPPORTS_RUNTIME_PM` was set.
|
||||
4. **Incomplete `wcn36xx` screen-off offload (`~10-15 mA`)**: `0008` enabled
|
||||
ARP/NS/GTK offload and `ignore_dtim`, but left Beacon Early Termination
|
||||
disabled (`enable_bet = 0`, `bet_interval = 0`), left `dtim_period` unaligned
|
||||
with `listen_interval`, left broadcast/multicast firmware filtering disabled
|
||||
(`bcast_mcast_filter = 0`), and never sent `WCN36XX_HAL_HOST_SUSPEND_IND`
|
||||
when entering screen-off offload or `HOST_RESUME_REQ` on screen wake.
|
||||
5. **Unpatched `drm_mipi_dbi.ko` shipped from May 30 (`panel-mipi-dbi` sync
|
||||
gap)**: `scripts/build-kernel-audio.sh`, `rebuild-image.sh`, and
|
||||
`scripts/apply-bananarchy-overlay.sh` exported `panel-mipi-dbi.ko.zst` and
|
||||
`msm.ko.zst`, but never rebuilt or packaged `drivers/gpu/drm/drm_mipi_dbi.ko`
|
||||
(`CONFIG_DRM_MIPI_DBI=m`).
|
||||
|
||||
### 21.2 Five deep-standby fixes implemented (`0009`)
|
||||
|
||||
1. **Unblock `rpmpd_sync_state()` + `icc_sync_state()` and drop idle BIMC floor
|
||||
to `19.2 MHz`**: enabled `CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y` in
|
||||
`patches/kernel/config-bananarchy-msm8909.armv7`, added the `drivers/base/core.c`
|
||||
`fw_devlink_sync_state_timeout` relaxation after init (`10 s` timeout
|
||||
guarantee), and lowered `opp-199999951` `opp-peak-kBps` from `<0xc3500>` to
|
||||
`<0x25800>` (`153,600 kBps`) across all six MSM8905/MSM8909 DTS files.
|
||||
2. **Release unclaimed `clk-smd-rpm` active (`QDSS`/`QPIC`) and sleep-set handoff
|
||||
votes**: `0009` adds `late_initcall_sync(rpm_smd_clk_late_cleanup)` in
|
||||
`drivers/clk/qcom/clk-smd-rpm.c` to drop active votes on unclaimed `QDSS` and
|
||||
`QPIC` RPM clocks and clear `QCOM_SMD_RPM_SLEEP_STATE` handoff votes on all
|
||||
unclaimed RPM clocks (`PCNOC`, `SNOC`, `BIMC`, `IPA`, `QPIC`, `QDSS`,
|
||||
`BB_CLK1`, `RF_CLK1`, `DIFF_CLK1`, `DIV_CLK1`) without touching `ACTIVE_STATE`
|
||||
on modem-critical `BB_CLK1` or `RF_CLK1`.
|
||||
3. **Shut down `phy-qcom-usb-hs` and autosuspend `ci_hdrc` while unplugged**:
|
||||
`0009` updates `ci_hdrc_msm.c` and `core.c` to hold parent runtime PM across
|
||||
`ci_hdrc_add_device()`, configure a `200 ms` autosuspend delay on both parent
|
||||
and child `ci_hdrc` devices, call `usb_phy_shutdown()` on runtime suspend when
|
||||
`vbus_extcon` is disconnected (and re-initialize on resume/connect), and end
|
||||
probe with `pm_runtime_put_autosuspend()`.
|
||||
4. **Enable WCN3620 BET, `dtim_period` sync, multicast filter, and
|
||||
`HOST_SUSPEND_IND` / `HOST_RESUME_REQ` in `screen_off_offload`**:
|
||||
`wcn36xx/{wcn36xx.h,smd.c,main.c}` now program `enable_bet = 1`,
|
||||
`bet_interval = listen_interval`, `dtim_period = listen_interval`,
|
||||
`bcast_mcast_filter = 3`, and send `wcn36xx_smd_wlan_host_suspend_ind()` /
|
||||
`HOST_RESUME_REQ` on screen-off / screen-on transitions while keeping host
|
||||
`rx_irq`/`tx_irq` armed for immediate inbound SSH/IM wake.
|
||||
5. **Build and ship `drm_mipi_dbi.ko.zst` cleanly**: `scripts/build-kernel-audio.sh`,
|
||||
`rebuild-image.sh`, `scripts/apply-bananarchy-overlay.sh`, and
|
||||
`scripts/check-rebuild.sh` now build, compress, install into `overlay/rootfs`
|
||||
and target rootfs/initramfs, and verify `drm_mipi_dbi.ko.zst` alongside
|
||||
`panel-mipi-dbi.ko.zst`.
|
||||
Reference in new issue
Block a user