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

+7 -6
View File
@@ -14,20 +14,21 @@ Release versions follow the `<year-letter><MM><DD>` format (where `2026` is `a`,
Upcoming release build (`a1114` / `carbonara` via `scripts/version.sh`) targeting both **Nokia 8110 4G (`nokia-argon`)** and **Nokia 2720 Flip (`nokia-beatles`)** while keeping `a1111` (`lennon`) as the current published release.
### Hardware, kernel, and firmware deep-standby fixes (`0008`)
### Hardware, kernel, and firmware deep-standby fixes (`0008` and `0009`)
- **MSM8909 RPM interconnect bus scaling (`CONFIG_INTERCONNECT_QCOM_MSM8909=y`)**: enabled `CONFIG_INTERCONNECT_QCOM=y`, `CONFIG_INTERCONNECT_QCOM_MSM8909=y`, and `CONFIG_INTERCONNECT_QCOM_SMD_RPM=y`, marked `msm8909_bimc`, `msm8909_pcnoc`, and `msm8909_snoc` `.keep_alive = true` (`19.2 MHz` active floor, `0` in `QCOM_SMD_RPM_SLEEP_STATE`), initialized `qp->bus_clk_rate[*]` to `U32_MAX` in `qnoc_probe()` so `icc_sync_state` clears `clk_smd_rpm_handoff()`'s `INT_MAX` sleep-set vote in RPM, and wired `interconnect@400000`, `interconnect@500000`, `interconnect@580000`, `cpus` `interconnects`, and `cpu-opp-table` `opp-peak-kBps` across all six MSM8905/MSM8909 DTS files while preserving `vermagic` across all 580 `.ko.zst` modules.
- **Live WCN3620 screen-off firmware offloads and `conf.listen_interval` sync**: `wcn36xx` now assigns both `hw->max_listen_interval` and `hw->conf.listen_interval` from `listen_interval` (clamped `1..10`, default `5`) before `ieee80211_register_hw()`, and exposes `/sys/module/wcn36xx/parameters/screen_off_offload` (toggled by `bananarchy-display-power-sync`). When screen-off offload is active, `wcn36xx` enables firmware ARP offload (when a single IPv4 address is assigned, preserving DHCP), IPv6 NS offload, GTK rekey offload, `ignore_dtim = true`, and `dynamic_ps_timeout = 40 ms` without calling `wlan_host_suspend_ind` or disabling `rx_irq`/`tx_irq`, preserving immediate inbound unicast delivery.
- **ChipIdea USB runtime PM while unplugged (`ci_hdrc_msm`)**: enabled `CI_HDRC_SUPPORTS_RUNTIME_PM`, wrapped `ci_hdrc_msm_por_reset()` in `pm_runtime_resume_and_get()`/`pm_runtime_put()`, gated `iface_clk` (`100 MHz`) and `core_clk` (`80 MHz`) via `RUNTIME_PM_OPS` whenever `vbus_extcon` is disconnected, and skipped `ULPI_SYNC_STATE` viewport polling in `ci_ulpi_resume()` when `CI_HDRC_OVERRIDE_PHY_CONTROL` is set so USB RNDIS (`172.16.42.1`) hotplug and plugged boots resume cleanly.
- **MSM8909 RPM interconnect bus scaling (`CONFIG_INTERCONNECT_QCOM_MSM8909=y`)**: enabled `CONFIG_INTERCONNECT_QCOM=y`, `CONFIG_INTERCONNECT_QCOM_MSM8909=y`, and `CONFIG_INTERCONNECT_QCOM_SMD_RPM=y`, marked `msm8909_bimc`, `msm8909_pcnoc`, and `msm8909_snoc` `.keep_alive = true` (`19.2 MHz` active floor, `0` in `QCOM_SMD_RPM_SLEEP_STATE`), initialized `qp->bus_clk_rate[*]` to `U32_MAX` in `qnoc_probe()` so `icc_sync_state` clears `clk_smd_rpm_handoff()`'s `INT_MAX` sleep-set vote in RPM, wired `interconnect@400000`, `interconnect@500000`, `interconnect@580000`, `cpus` `interconnects`, and `cpu-opp-table` `opp-peak-kBps` across all six MSM8905/MSM8909 DTS files, and lowered the `199999951 Hz` idle CPU OPP `opp-peak-kBps` floor from `<0xc3500>` (`100 MHz` BIMC) to `<0x25800>` (`153,600 kBps` = `19.2 MHz` XO floor) (`0009`) while preserving `vermagic` across all 580 `.ko.zst` modules.
- **Unblock `fw_devlink` `sync_state` (`CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y`) and release unclaimed `clk-smd-rpm` votes (`0009`)**: enabled `CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y` with `fw_devlink` post-init relaxation in `drivers/base/core.c` so driverless `/cpus/cpu@0..3` no longer deadlock `rpmpd_sync_state()` (`VDD_CX`/`VDD_MX` stuck at `SUPER_TURBO`) or `icc_sync_state()`, and added `late_initcall_sync(rpm_smd_clk_late_cleanup)` in `drivers/clk/qcom/clk-smd-rpm.c` to drop active votes on unclaimed `QDSS`/`QPIC` clocks and clear RPM `SLEEP_STATE` boot-handoff votes on all unclaimed clocks without altering `BB_CLK1`/`RF_CLK1` active votes.
- **Live WCN3620 screen-off firmware offloads, BET, and `HOST_SUSPEND_IND` (`0008` + `0009`)**: `wcn36xx` now assigns both `hw->max_listen_interval` and `hw->conf.listen_interval` from `listen_interval` (clamped `1..10`, default `5`) before `ieee80211_register_hw()`, and exposes `/sys/module/wcn36xx/parameters/screen_off_offload` (toggled by `bananarchy-display-power-sync`). When screen-off offload is active, `wcn36xx` enables firmware ARP offload (when a single IPv4 address is assigned, preserving DHCP), IPv6 NS offload, GTK rekey offload, `ignore_dtim = true`, `dynamic_ps_timeout = 40 ms`, Beacon Early Termination (`enable_bet = 1`, `bet_interval = listen_interval`), aligned `dtim_period = listen_interval`, `bcast_mcast_filter = 3`, and `WCN36XX_HAL_HOST_SUSPEND_IND` / `HOST_RESUME_REQ` while keeping `rx_irq`/`tx_irq` armed for immediate inbound unicast delivery.
- **ChipIdea USB runtime PM and unplugged HS PHY shutdown (`ci_hdrc_msm`)**: enabled `CI_HDRC_SUPPORTS_RUNTIME_PM`, wrapped `ci_hdrc_msm_por_reset()` in `pm_runtime_resume_and_get()`/`pm_runtime_put()`, gated `iface_clk` (`100 MHz`) and `core_clk` (`80 MHz`) via `RUNTIME_PM_OPS` whenever `vbus_extcon` is disconnected, skipped `ULPI_SYNC_STATE` viewport polling in `ci_ulpi_resume()` when `CI_HDRC_OVERRIDE_PHY_CONTROL` is set, and in `0009` added `200 ms` runtime autosuspend on both `ci_hdrc_msm` and `ci_hdrc`, held parent runtime PM across `ci_hdrc_add_device()`, and called `usb_phy_shutdown()`/`usb_phy_init()` across unplugged suspend/resume so `pm8909_l13` (`3.075 V`), `pm8909_l7` (`1.8 V`), and `xo` drop cleanly while preserving USB RNDIS (`172.16.42.1`) hotplug.
- **Default dual-port DSDS `MODEM_DRX_MODE=6` and dark-screen `dsds-daemon` sleep**: `bananarchy-power-policy.conf` now defaults to `MODEM_DRX_MODE=6` while keeping `DSDS_SECONDARY_MODE=active` so both SIMs remain reachable; `msm-modem-uim-selection` adds `at all` multi-port queries and `screen_is_idle()` in `dsds-daemon` (`poll_timeout = None` whenever locked, cover-lit, or backlight off); and `bananarchy-power-policy.sh` serializes AT access via `flock`, waits past `ModemManager`'s startup AT port probe, and re-applies `AT$QCDRX=6` across every `/dev/wwan0at*` port on `modem-ready` (`sxmo_hook_modem.sh` `registered`/`connected` and post-PIN/switch registration) with per-port inode caching in `/run/bananarchy-power-policy/drx.<port>`.
- **MIPI DCS `DISPOFF` + `SLPIN` on `panel-mipi-dbi` DPMS off**: rebuilt `panel-mipi-dbi.ko.zst` with `panel_mipi_dbi_disable()` issuing `0x28` (`msleep(20)`) + `0x10` (`msleep(50)`) under `drm_dev_enter()` after `backlight_disable()` and before `mipi_dbi_pipe_disable()`, stopping the GC9305/ST7789V boost converter and 60 Hz GRAM scan during DPMS off while preserving the 2720 Flip closed-only `backend = kernel` cover path.
- **MIPI DCS `DISPOFF` + `SLPIN` on `panel-mipi-dbi` DPMS off and `drm_mipi_dbi.ko.zst` rebuild (`0008` + `0009`)**: rebuilt both `panel-mipi-dbi.ko.zst` (`panel_mipi_dbi_disable()` issuing `0x28` (`msleep(20)`) + `0x10` (`msleep(50)`) under `drm_dev_enter()` after `backlight_disable()` and before `mipi_dbi_pipe_disable()`) and `drm_mipi_dbi.ko.zst` (previously unbuilt in `scripts/build-kernel-audio.sh` and omitted from `rebuild-image.sh` / `apply-bananarchy-overlay.sh`), halting the GC9305/ST7789V boost converter and 60 Hz GRAM scan during DPMS off while preserving the 2720 Flip closed-only `backend = kernel` cover path.
- **Unconditional `net/wwan0` BAM-DMUX registration for `ModemManager` and primary-SIM QMI VOICE USSD fallback**: fixed `error: couldn't find modem` when running USSD or `mmcli` operations on Wi-Fi-only setups without a saved `type=gsm` NetworkManager profile. Because `MMPluginQcomSoc` sets `base-modem-data-net-supported = TRUE` and `base-modem-data-tty-supported = FALSE`, `ModemManager` drops `/org/freedesktop/ModemManager1/Modem/0` whenever `net/wwan0` is absent, while `bam-dmux.c` already runtime-suspends after `1000 ms` of inactivity (`pc_state=0`, DMA channels released) at zero standby cost. `etc/init.d/msm8909-modem-wwan-port` and `msm-modem-uim-selection` (`provision_slot()` / `bananarchy-dpm.sh open`) now open `--dpm-open-port=hw-data-ep-type=bam-dmux,...` unconditionally and wait for `/sys/class/net/wwan0` (running `mmcli -S` if opened after `ModemManager` startup), `10-bananarchy-dpm.sh` no longer closes the DPM port on interface `down`, and `msm-modem-uim-selection ussd` resolves `mm_modem` via `mmcli -L` and falls back to direct `AF_QIPCRTR` QMI VOICE USSD (`QMI_SERVICE_VOICE = 9`, `sub = 0`) on the primary SIM alongside `sub = 1` on the secondary SIM.
### Dual-target idle wakeup elimination and GPU/scheduler power sync
- **2720 Flip event-driven idle daemons (`nokia-beatles`)**: replaced `bananarchy-lid`'s continuous `20 ms` (`50 Hz`) `poll()` loop, `10 Hz` `/sys/kernel/debug/gpio` full SoC GPIO register dump, and `2 s` `/dev/input` `glob` + `/run/bananarchy/cover.sock` broadcast with `/dev/input` `inotify` watching plus hardware `EV_SW` IRQ sleep (`poll(..., -1)` at `0` steady-state wakeups/s after the `20 ms` edge debounce and one `+2 s` post-transition confirmation check), and synchronized CPU `scaling_governor`, `schedutil/rate_limit_us` (`40000`), and Adreno 304 `governor` directly in `on_transition()`. Replaced `bananarchy-volume-keys`'s `1 s` `poll()` + `2 s` `/dev/input` `glob` loop with `/dev/input` `inotify` + `poll(..., -1)`.
- **Shared GPU `devfreq`, `schedutil`, statusbar, eMMC, and Bluetooth idle fixes (`nokia-argon` and `nokia-beatles`)**: granted `video`-group `0664` permissions to `/sys/class/devfreq/1c00000.gpu/governor` in `10-power-save.start`, synced `1c00000.gpu/governor` (`powersave` while dark or cover-lit, `simple_ondemand` when the main panel wakes) in `bananarchy-display-power-sync` and `locker.so`, and restored `schedutil/rate_limit_us = 40000` on `FORCE=1` transitions as well as normal udev events. `sxmo_hook_statusbar.sh` skips `sxmo_hook_icons.sh` on `time` ticks and updates `099-time` directly in-shell without spawning `sxmo_status.sh` and duplicate `mkdir -p` forks every minute; `sxmo_wm.sh display off` skips rewriting `~/.config/sxmo/brightness` on ext4 when unchanged; `sxmo_hook_screenoff.sh` skips spawning `sxmo_autosuspend.sh` when `/etc/bananarchy-no-deep-standby` is present; and `bananarchy-bt-obex` replaces its `1.0 s` D-Bus/RFCOMM poll and `1.5-2.0 s` `/dev/input` gamepad scan with a signal self-pipe, `ctypes` `inotify`, and blocking `select.select(..., None)` (`0` idle wakeups/s when Bluetooth is enabled, `<5 ms` gamepad hotplug).
- **Image persistence and upcoming release archives**: rebuilt both `images/bananarchy-nokia-argon.img` (SHA-256 `76da5b9d9ed555ebebe76ba79222ef4211c1a4c50437755f0abdbcc0c99449d4`) and `images/bananarchy-nokia-beatles.img` (SHA-256 `81d62838c2a105dfaf339a6e71016e215e8e68e8857eb46d3a24fe2fd691cce7`, with standalone `images/boot-bananarchy-nokia-beatles.img` SHA-256 `4e16742bc1c2461cd6a63f15009a2c0a8550dae7adf7f1ab83209d3df21726ae` and unchanged display lk2nd `b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d`) stamped as `a1114` / `carbonara` with `--mkinitfs`, pinned in `scripts/check-rebuild.sh`, and packaged into `bananarchy-nokia-argon-a1114-carbonara.zip` and `bananarchy-nokia-beatles-a1114-carbonara.zip`.
- **Image persistence and upcoming release archives**: rebuilt both `images/bananarchy-nokia-argon.img` (SHA-256 `f4c8921a674944b2687b2d7bcb52e6f3cb81ad5997fddac969949305c0479c60`) and `images/bananarchy-nokia-beatles.img` (SHA-256 `fd29593b30008b65b7b30b867824ce3f3f4e1f70cda4f012dde1a2c14dd316ba`, with standalone `images/boot-bananarchy-nokia-beatles.img` SHA-256 `d6cb9d5f13bc00815c4fcde5cf32b92ce9d7873683d3cec8b1346a53801ea08a` and unchanged display lk2nd `b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d`) stamped as `a1114` / `carbonara` with `--mkinitfs`, pinned in `scripts/check-rebuild.sh`, and packaged into `bananarchy-nokia-argon-a1114-carbonara.zip` (`a42ae7a6484a35b92580d8b9a6cbc58ba605e99d29cc5a353b423a69aa51febb`) and `bananarchy-nokia-beatles-a1114-carbonara.zip` (`463332fa4aeb78349a608d9a15f27c62dbe736129bdd2291b58f3ff1038a0a9f`).
---