Skip to content

drm/apple: stop the DCP firmware for a suspend-to-idle too - #2019

Draft
gig3m wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
gig3m:j813/dcp-s2idle-stop
Draft

gig3m wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
gig3m:j813/dcp-s2idle-stop

Conversation

@gig3m

@gig3m gig3m commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

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, but dcp_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.

Scope. On this tree alone only T8140 has hw.s2r, and it has not run there. T8142 gets it through #1941, which is what I tested with. Draft until #1941 lands or someone runs it on a T8140.

Tested on J813 (T8142, firmware 27.0, #1941 applied, appledrm.s2r_untested=1), pm_test=platform suspends of 60 and 120 s on battery, display on before each:

Power Firmware
before 1.53, 1.53, 1.55 W runs through the sleep
after 0.53, 0.58, 0.57 W stopped in the suspend, restarted in the resume

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 (no RTC wake on this board yet), 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: Claude Fable 5.2

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.

On this tree only T8140 has hw.s2r, so that is the SoC this changes
today, and it has not run there. It has run on a J813 (T8142, firmware
27.0) with the T8142 firmware stop from the pull request below applied
(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#1941
Assisted-by: Claude Fable 5.2
Signed-off-by: Kyle Arrington <kyle@arrington.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant