Repository navigation
Conversation
On T602x with the 13.5 OS firmware stub the internal DCP has no stop of its own for a deep sleep: dcp_s2r_capable() only covers H17P and 27.x. Its suspend leaves the firmware running as for s2idle, the sleep's commit then takes the coprocessor down, and at resume dcp_poweron() waits on a dead firmware: apple-dcp 389c00000.dcp: wait for power timed out, connector will be broken apple-dcp 389c00000.dcp: set_digital_out_mode timed out and the panel stays off until reboot. Do what macOS does on this firmware: put the AP link to sleep (A500), idle the firmware and stop its CPU with its buffers kept, and at resume, before the display subsystem powers the panel on, power-cycle the coprocessor's block and warm-restart the firmware. A sleep refused before the commit gets the same restart: an idled firmware doesn't wake where it is, even with its power kept. Signed-off-by: Justin Pfister <git@jjrpf.com>
This was referenced Dec 5, 2026
There was a problem hiding this comment.
Verdict: CHANGES at 138350b
Failure: The 13.5 link-sleep RPC passes a stack completion to dcp_push and returns after a timeout while the ACK callback can still hold that address. The timeout path resets channel depths only after the completion's stack frame has ended. The ACK handler can also take the callback and cookie before a depth reset. A late ACK can therefore call complete on a dead stack object. Keep the completion valid until the callback is finished or synchronously cancel the callback before returning.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
This branch has not been deployed
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: On T602x with the 13.5 OS firmware stub, the internal DCP has no stop of its own for a deep sleep:
dcp_s2r_capable()only covers H17P and 27.x. Its suspend leaves the firmware running, as for s2idle. The sleep's commit then takes the coprocessor down, and at resumedcp_poweron()waits on a dead firmware:The panel stays off until reboot, and the backlight returns
-EIO. This makes the 13.5 firmware do what macOS does. At suspend it puts the AP link to sleep (A500), idles the firmware and stops its CPU with its buffers kept. At resume, before the display subsystem powers the panel on, it power-cycles the coprocessor's block (keeping its DARTs) and warm-restarts the firmware. A sleep refused before the commit gets the same restart: an idled firmware doesn't wake where it is, even with its power kept (IOP power acknowledgment failed: -62without it). The sequence is the one the earlier T602x S2R work used. It only runs for a non-external DCP on 13.5 firmware in a firmware deep sleep whose commit stops coprocessors, and not on a dry run.Today nobody hits this on main, because the legacy GPU backend refuses every deep sleep on these Macs. #4313 lets that GPU sleep, so it needs this to land with it or before it; otherwise a J414s on the 13.5 stub wakes to a black screen.
Tested: J414s M2 Pro, OS firmware 13.5 / system firmware 27.2, on aurora/main
efef6707019e+ #4313, stock command line, internal panel watched each time:boot object resumes 0 -> 1each): panel back with the desktop, brightness keys work. Each time all three 13.5 DCPs (389c00000,289c00000,315c00000) logged "idled and stopped" then "warm-restarted", followed bydcp_set_power_state_req returned, 9972 ms remaininganddcp_hotplug() connected:1.pm_test=devices, deep): panel back. Before the refused-path change, the same test left it off.Rebased onto current main (
d0684a0604a0), where it compiles cleanly (LLVM, arm64); I haven't booted that exact tree.Risk: two-way door · only internal DCPs on 13.5 firmware in a firmware deep sleep. On T602x today that is the J414s, once #4313 lets it sleep. #4239 (T6000 J314s) and #4305 (T6001 J316c) add deep sleep to M1 Pro/Max Macs that can also run 13.5 display firmware: if they land, their internal DCP would take this path too, and its power-cycle reads its domains from the DT (
resets->power-domains), skipping the cycle if they can't be mapped. I couldn't test those. No change for 12.3, 14.x, H17P, 27.x, external DCPs or s2idle.