Repository navigation
Conversation
With hw.s2r a DPMS off stops the internal display's firmware and powers
its domains off, and a firmware-driven sleep stops it from the DCP's own
suspend. A suspend-to-idle does neither. The DRM device's suspend turns
the CRTC off, which arrives as a DPMS off, but dcp_dpms_power_cycles()
refuses during any system sleep, so only the backlight goes down and the
firmware runs for the whole sleep. It is only stopped if the compositor
blanked the display before suspending.
Let the DPMS power cycle run during a sleep that is not firmware-driven.
The resume side needs nothing new: the DRM device's resume turns the
CRTC on, and dcp_dpms_power_on() starts the firmware again as after any
DPMS off. In the DCP's own suspend a suspend-to-idle takes the generic
path, which already copes with firmware that DPMS stopped: it is the
state a compositor that blanks before suspending leaves.
Crashed firmware is still refused there, as for any DPMS off.
dcp_s2r_stops_crashed() asked only for a system sleep, which was the same
thing while DPMS off never ran in one; it now asks for a firmware-driven
sleep, so its two callers behave as before.
By default only T8140 has hw.s2r, so that is the SoC this changes, and
it has not run there yet. It ran on a J813 (T8142, firmware 27.0) before
the T8142 firmware stop was merged, with that series applied and
appledrm.s2r_untested=1. Test suspends with pm_test=platform and
pm_test_delay 60 and 120 (devices suspended, the SoC held short of the
idle loop), on battery, display on before each:
before: 1.53 W, 1.53 W, 1.55 W; the firmware runs through the sleep
after: 0.53 W, 0.58 W, 0.57 W; "IOMFB: power on -> off" inside the
suspend, "RTKit: Initializing" and "power off -> on" inside the
resume, panel and backlight back
The stop adds 146 ms to the suspend and the start 57 ms to the resume.
With the display already off by DPMS nothing changes (0.51 W, restart at
the next DPMS on). A real suspend-to-idle and a crashed firmware were not
run.
Link: aurora-silicon#2135
Signed-off-by: Kyle Arrington <kyle@arrington.co>
|
The logic reads correctly to me. Since Assisted-by: LLM (Claude:Opus 5.5) |
|
I'm stepping back from this one. The branch stays up and maintainer edits are enabled, so take it, rework it, or close it as you see fit. The code is GPL-2.0 under my Signed-off-by; use it however helps. Assisted-by: LLM (Claude:Opus 5.5) |
With
hw.s2r, a DPMS off stops the internal display's firmware, and a firmware-driven sleep stops it from the DCP's own suspend. A suspend-to-idle does neither: the DRM device's suspend turns the CRTC off, butdcp_dpms_power_cycles()refuses during any system sleep, so only the backlight goes down and the firmware runs for the whole sleep, unless the compositor blanked first.This lets the DPMS power cycle run during a sleep that is not firmware-driven. Resume needs nothing new. A crashed firmware is refused as before.
Replaces #2019: the same change on current integration/aurora, without the commit trailer.
Scope. By default only T8140 has
hw.s2r, and it has not run there. I have only a J813, so the T8140 row needs someone with a Neo.Not yet run on this head. The numbers below are from the old base (T8142, firmware 27.0, #1941's series applied before it came in through #2135,
appledrm.s2r_untested=1),pm_test=platformsuspends of 60 and 120 s on battery, display on before each. The J813 row on this head, default command line, real s2idle, is to follow:The stop adds 146 ms to the suspend, the start 57 ms to the resume. Panel and backlight came back each time. With the display already off by DPMS nothing changes (0.51 W).
Not run: a real suspend-to-idle, a crashed firmware, T8140.
This also explains the J815 numbers in #1941: KWin blanks 0-2 s before s2idle there, so its firmware was already stopped.
Assisted-by: LLM (Anthropic:Claude Fable 5.2)