Repository navigation
drm/apple: T6041 S2R: no second power-off for a display DPMS already turned off - #3143
Merged
DjDeveloperr merged 1 commit intoNov 25, 2026
Merged
Conversation
…turned off A lid close blanks the internal panel before the sleep: the desktop's DPMS off runs set_power_state(0) on the internal DCP, and its D572(0) comes then, while s2r_active is clear. The S2R display stop then sent a second set_power_state(0), which gets no D572, and failed the suspend: apple-dcp 402e00000.dcp: no D572 after the power-off apple-drm display-subsystem: PM: failed to suspend: error -110 so on the J614c every lid sleep was refused, and systemd retried every 30 s while the lid stayed closed. rtcwake with the panel lit was not affected. Remember that the firmware confirmed the scanout stop of a power-off (pipe_off), until the next power-on starts. When the S2R stop finds the pipe already off, skip the second power-off and its D572 wait, and turn the display DART's streams off as that D572(0) would have. If the stop fails later, the unwind turns them on again. Fixes: 4af660c ("drm/apple: T6041 S2R display stop and warm restart") Signed-off-by: Jos Dehaes <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
This was referenced Nov 25, 2026
satchlj
approved these changes
Nov 25, 2026
satchlj
left a comment
Member
There was a problem hiding this comment.
Verdict: MERGE at 4becf7429859
Blockers: none
Checked: Full diff audit of dcp->pipe_off tracking in iomfb_poweroff()/iomfb_poweron() and the dcp_t6041_stop_one() S2R bypass + streams_off unwind path in drivers/gpu/drm/apple/dcp.c, dcp-internal.h, and iomfb_template.c; verified all 20 CI checks green (0 active, 0 failing) and the J614c hardware sleep/wake verification row in the PR body.
Evidence
iomfb_poweroff()setsWRITE_ONCE(dcp->pipe_off, true)only whendcp_power_stop_confirmed(poff_cookie)succeeds;iomfb_poweron()clears it immediately at entry (WRITE_ONCE(dcp->pipe_off, false)).dcp_t6041_stop_one()checksREAD_ONCE(dcp->pipe_off), skips the duplicate_dcp_poweroff()+D572wait when already off, turns offDCP_S2R_DISP_STREAMSviaapple_dart_display_streams(..., false, false), and tracksstreams_off = truesoerr_unwindrestores streams on(powered_off || streams_off).- CI at
4becf7429859(paginated check-runs by latest run ID):20/20green (apple-build,host-tests,kunit, all 15KUnit *suites includingKUnit clpcandKUnit trusted-keys,pr-text,readiness;0active,0failed). - Hardware row in PR body: J614c (M4 Max), 5/5 lid sleeps + clamshell
rtcwaketaking the new path and waking cleanly, plus 1/1 lit-panelrtcwakeregression check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: when the internal panel is already off at a deep sleep (the desktop blanks it on a lid close), the T6041 S2R display stop no longer sends a second power-off and waits for a D572 that never comes, so lid sleeps on the J614c no longer fail with
-110. Fixes the lid case of the T6041 sleep from #1664.Tested: J614c (M4 Max), this commit's change on
main34bdf71 (head 4becf74 only rewraps one line of it for the 100-column limit): 5 of 5 lid sleeps and a clamshellrtcwaketake the new path (display already off: no second power-off), sleep and wake, the panel back lit;rtcwakewith the panel lit (the unchanged path) 1 of 1. Without it, every lid sleep refused (6 of 6).Risk: two-way · M4 Max (T6041); the S2R stop of the internal DCP only, when a confirmed power-off had no power-on after it
Not yet: J616c and J575c; desktops other than GNOME
On the J614c with
main, a deep sleep from closing the lid never happens.rtcwake -m memwith the panel lit works, but every lid sleep fails within about 1.5 s, and systemd retries every 30 s while the lid stays closed:When the lid closes, the desktop blanks the internal panel first. That DPMS off runs set_power_state(0) on the internal DCP, the firmware confirms the scanout stop, and its D572(0) comes then, while
s2r_activeis still clear.dcp_t6041_stop_one()then sends a second set_power_state(0) and waits for a D572(0). The firmware has nothing left to power down and sends none, so the stop gives up afterDCP_S2R_D572_TIMEOUT_MSand fails the suspend.The fix:
iomfb_poweroff()records the firmware's confirmed scanout stop in a newdcp->pipe_off, andiomfb_poweron()clears it as it starts.dcp_t6041_stop_one()finds the internal pipe already off, it skips the second power-off and its D572 wait, and turns the display DART's streams off itself, as that D572(0) would have done indcp_s2r_dart_power(). The pipe no longer scans out, so this is the state the D572(0) path reaches.With the panel lit (rtcwake, or a sleep started from a terminal) the stop runs as before: power-off, D572(0) wait, then the stop.
External USB-C displays not coming back after a deep sleep is a separate problem (#3141) and isn't changed here.
Evidence
Kernel:
main34bdf71 plus this change, #3142, #2061, #2170 and #2171, aura 1.0.0b14.1, default command line, GNOME.-110rtcwake -m mem -s 20, panel litdisplay already off: no second power-off, panel lit afterrtcwake -m mem -s 20, clamshell (internal panel off, three external displays)rtcwake -m mem -s 20, panel litThe speakers and Wi-Fi worked after every wake.
checkpatch.pl --strictclean; the changed objects build with W=1 without warnings.