Repository navigation
drm/asahi: g17: refuse a sleep the commit can't stop - #1839
Merged
Merged
Conversation
Where the sleep's commit couldn't take the GPU's stop and the sleep driver didn't require it, .prepare stopped the firmware itself. A later refusal of that sleep then left the GPU stopped, with publication closed, until the next real sleep: the hole #1314 closes for G16. Refuse the sleep instead, as G16 does. On the A18 Pro, the only G17 chip that sleeps, the GPU's .prepare only runs for a sleep the sleep driver takes, and that leaves the stop to its commit, so the fallback wasn't reached. With it go the Rust stop and its tests. Signed-off-by: Diljit Singh <hey@djdev.me>
Contributor
Author
|
Tested on the MacBook Neo (J700), 2026-11-13. A one-shot test boot ran this change as
|
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.
The G16 counterpart is in #1314: when the sleep's commit can't take the GPU's stop, G16 now refuses the sleep in
.prepare. G17 still had a fallback there, which this removes.Before. If
asahi_g17_commit_prepare()failed andasahi_g17_commit_required()was false, G17's.preparestopped the firmware itself ("no GPU stop at the commit: stopping it now"). Any later refusal of that sleep then took.completeintosleep_hold(): the firmware stayed stopped and publication stayed closed until the next real sleep. Every GPU job hung meanwhile.After.
.prepareonly drains, checks for quiet and leaves the stop to the commit, or refuses the sleep with EBUSY if the commit can't take it. A sleep refused before the commit then always finds the firmware never stopped, and.completejust reopens publication.Reach. The A18 Pro (T8140) is the only G17 chip with
sleep_restart; the others refuse sleep outright. On it, the GPU's.prepareonly runs for a firmware sleep (driver.rs). The only source of those is the sleep driver, which leaves the stop to its commit, soasahi_g17_commit_required()is true and the fallback was not reached. The change takes out a stop path that a future sleep path could reach, and with it the Rust stop sequence (down(), and theidle/wake/stophardware steps it alone used) and their kunit tests.up(),hold()andlower_domain()keep theirs.asahi_g17_commit_required()stays insleep.c/sleep.hfor now, to stay clear of #1314's lines there.Testing
aurora.ko:pm_test(devices, thenplatform: every device suspended, then the sleep refused before the platform's enter, where the commit runs);🤖 Generated with Claude Code