Implement 0010 RPM/L2/WCD/UART deep-standby, Adreno 304 ICC/SMMU fixes, and C11 autostart daemons
- patches/kernel/0010-msm8909-rpm-lpm-bimc-wcd-ldo-uart.patch and device DTS/DTB files (nokia-{argon,beatles,beatles-cover,coconut,sparkler,leo}): vMPM APSS RPM sleep, L2 SAW2 collapse, WCD-digital runtime PM, PM8909 LDO seeding, ttyMSM0 disable, dynamic msm_gpu gfx-mem BIMC interconnect scaling (mas_oxili), and qcom_iommu context restore + atomic TLB flush on resume.
- Replace Python/shell autostart loops with compiled C11 ARM ELF daemons (bananarchy-dsds, bananarchy-modemmonitor, bananarchy-soundmonitor, bananarchy-notifmonitor, bananarchy-run-aligned, bananarchy-session-loop) plus scripts/test-dsds-daemon.py.
- Update scripts/check-rebuild.sh, CHANGELOG.md, BATTERY-OPTIMIZATION-ANALYSIS.md, MANUAL.md, README.md, and AGENTS.md with verified a1114 (carbonara) image/archive pins and guards.
This commit is contained in:
1 parent
96c66bf0c6
commit
2ae4ef34a2
86 files changed
+99754
-94563
No files matched your search
@@ -1416,3 +1416,79 @@ beacon wakeups, and stale `drm_mipi_dbi.ko` active:
|
||||
`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`.
|
||||
|
||||
---
|
||||
|
||||
## 22. Pass 1 + Pass 2 RPM sleep (`vMPM` + L2 SAW2), BIMC PLL / WCD-digital / LDO cleanup, and UART/Wi-Fi standby optimizations (`0010`)
|
||||
|
||||
On-device clock and genpd telemetry after `0009` (`pm_genpd_summary` +
|
||||
`clk_summary`, losing ~`4.8%/h`) exposed the remaining blockers preventing XO/CX/MX
|
||||
and BIMC DDR from collapsing during deep idle (while revealing that an active `mas_oxili` GPU without a `gfx-mem` interconnect vote starved when `cpu0` dropped to `19.2 MHz` BIMC XO):
|
||||
`qcom_stats`/`qcom_rpm_master_stats` were not wired in DT, `gpu@1c00000` lacked `gfx-mem` BIMC scaling,
|
||||
`gcc_blsp1_uart1_apps_clk` (`ttyMSM0` / `serial@78af000`) kept `gpll0` active
|
||||
at `enable_count = 3`, and `cpuidle-qcom-spm` stopped at per-core `SPC` without
|
||||
vMPM timer programming or last-man L2 SAW2 shutdown.
|
||||
|
||||
1. **RPM LPM handoff (`qcom,mpm` vMPM + last-man `cpuidle-qcom-spm` + L2 SAW2,
|
||||
Pass 2)**: `0010` wires MSM8909 `qcom,mpm` (`sram@60000` sub-slices `0x150`
|
||||
APSS, `0x1d0` vMPM, `0x1150` MPSS, `0x2150` PRONTO; wakeup-parent on TLMM;
|
||||
`qcom,msm8916-rpm-stats` + `CONFIG_QCOM_RPM_MASTER_STATS=y` `rpm-master-stats`),
|
||||
adds the L2 SAW2 node (`power-manager@b012000`, `qcom,msm8909-saw2-v3.0-scu`)
|
||||
linked via `l2-cache` `qcom,saw` across all six MSM8905/MSM8909 DTS files,
|
||||
fixes SAW2 v3.0 `0x3B` / `PC_MODE` / `SLP_CMD_MODE` indexing and XPU-locked
|
||||
L2 readback guards, guards `qcom_mpm_handler()` against `NULL` `irq_desc`
|
||||
mappings for pre-enabled MPM pins (`49`, `58`, `62`), keeps per-CPU SPM in
|
||||
`PM_SLEEP_MODE_SPC` even when `l2_sleep=0`, and teaches
|
||||
`cpuidle-qcom-spm` to enter APSS RPM/vMPM sleep (`rpm_sleep=1`,
|
||||
`rpm_min_residency_us=3000`) and L2 SAW2 collapse (`l2_sleep=1`,
|
||||
`QCOM_SCM_CPU_PWR_DOWN_L2_OFF`) when the last online CPU enters idle, gated on
|
||||
`/sys/module/cpuidle_qcom_spm/parameters/screen_off` (toggled by
|
||||
`bananarchy-display-power-sync` and `bananarchy-power-policy.sh`) plus
|
||||
`qcom_msm8909_gdsc_is_active()` in `gcc-msm8909.c` so RPM/L2 collapse never
|
||||
fires while `oxili_gdsc`/`mdss_gdsc`/`venus_gdsc`/`vfe_gdsc` or the panel
|
||||
are active, uses `ktime_sub(tick_nohz_get_next_hrtimer(), ktime_get())` to
|
||||
avoid `tick_nohz` warnings, and keeps zero `vermagic`/`Module.symvers` ABI
|
||||
changes (`# CONFIG_SUSPEND is not set` unchanged).
|
||||
2. **Adreno 304 `gfx-mem` interconnect scaling, `qcom_iommu` non-genpd resume/TLB
|
||||
fix, GDSC recovery cycle, WCD-digital runtime PM, and PM8909 LDO seeding
|
||||
(Pass 1)**:
|
||||
- `qcom-msm8909.dtsi` and all six device DTS files wire `gpu@1c00000`
|
||||
`interconnects` (`MAS_OXILI -> SLV_EBI`, `"gfx-mem"`). Instead of holding
|
||||
BIMC at `400 MHz` statically from probe, `msm_gpu_pm_resume()` votes
|
||||
`Bps_to_icc(gpu->fast_rate) * 8` before enabling GPU clocks and
|
||||
`msm_gpu_pm_suspend()` drops the vote to `0` after disabling clocks so
|
||||
idle/screen-off BIMC still reaches `19.2 MHz` XO while active rendering
|
||||
and DPMS transitions never starve the GPU.
|
||||
- `qcom_iommu.c` wraps blocking `qcom_iommu_map()` calls with runtime PM
|
||||
and saves/restores non-secure context bank registers + flushes
|
||||
`ARM_SMMU_CB_S1_TLBIASID` in `qcom_iommu_resume()` even when
|
||||
`dev->pm_domain` is `NULL` (`VDD_CX` collapse on `1f08000.iommu`).
|
||||
- `gcc-msm8909.c` exposes `qcom_msm8909_gdsc_is_active()`, and
|
||||
`adreno_gpu.c` (`adreno_recover()`) cycles `dev_pm_genpd_synced_poweroff()`
|
||||
+ `pm_runtime_put_sync()`/`pm_runtime_get_sync()` on the GPU device so
|
||||
`oxili_gdsc` resets cleanly on ringbuffer lockups.
|
||||
- `msm8916-wcd-digital.c` sets `.idle_bias_on = 0`, adds `REGCACHE_FLAT` and
|
||||
`200 ms` runtime PM autosuspend + `RUNTIME_PM_OPS`.
|
||||
- `qcom_smd-regulator.c` seeds `vreg->is_enabled = 1` for PM8909 `l14`,
|
||||
`l15`, and `l18` in `rpm_regulator_init_vreg()` so unused rails drop cleanly
|
||||
after `regulator_late_cleanup`.
|
||||
3. **Serial UART console (`ttyMSM0` / `serial@78af000`) disabled**: disabled
|
||||
`serial@78af000` and cleared `chosen/stdout-path` in all kernel and device
|
||||
DTS files and removed `console=ttyMSM0,115200` from all `kernel-cmdline.conf`
|
||||
and `50-device-*.conf` fragments so `blsp1_uart1_apps_clk` no longer holds
|
||||
`gpll0` (`enable_count = 0`).
|
||||
4. **Runtime policy & telemetry additions (`bananarchy-power-policy.conf` /
|
||||
`.sh`)**: added `CPU_RPM_SLEEP=1`, `CPU_L2_SLEEP=1`,
|
||||
`WIFI_SCREEN_OFF_IPV6_MUTE=1` (mutes unsolicited IPv6 RAs on `wlan0` during
|
||||
screen-off whenever `wlan0` already holds an IPv4 address, restored on wake),
|
||||
and opt-in `WIFI_STANDBY_RAT=keep|gsm` (parks QMI NAS mode preference to GSM
|
||||
after 30 s dark while `wlan0` is `up`, restored on wake), plus `status`
|
||||
readouts for `cpuidle_qcom_spm`, `/sys/kernel/debug/qcom_stats/*`, and
|
||||
`/sys/kernel/debug/qcom_rpm_master_stats/*`.
|
||||
5. **Compiled C11 autostart daemons (`bananarchy-dsds`, monitors, session)**:
|
||||
replaced `python3 - dsds-daemon`, `sxmo_modemmonitor.sh`,
|
||||
`sxmo_soundmonitor.sh` (`evtest`), `sxmo_notifs.sh monitor` (`inotifywait`),
|
||||
`sxmo_run_aligned.sh` (`sxmo_aligned_sleep`), and the
|
||||
`bananarchy-x11-session.sh` tail loop with 0%-CPU compiled C11 ARM ELF
|
||||
binaries (`poll(..., -1)` / `inotify` / `nanosleep`) built by
|
||||
`scripts/build-bananarchy-daemons.sh`.
|
||||
Reference in new issue
Block a user