Repository navigation
pmdomain: apple: wait separately for the T6000 GFX parent - #781
Draft
RyanTheTide wants to merge 2 commits into
Draft
RyanTheTide wants to merge 2 commits into
RyanTheTide wants to merge 2 commits into
Conversation
genpd_resume_noirq() powers the T6000 GPU's GFX domain back on after pm_test=platform. Its actual-state field can still report clock-gated (0x4) after the existing 100 us timeout, with the target already at 0xf. genpd_sync_power_on() ignores the callback's error and marks the domain on, so checking for the actual-state acknowledgment remains important. Allow power-on the same bounded 10 ms polling budget used by m1n1's pmgr_set_mode(). Keep the existing power-off and reset/disable budgets, and the strict-state domain's existing 10 ms budget. Continue to report and return a timeout if the actual state does not acknowledge the request; neither an on target nor an intermediate actual state counts as success, except for the existing externally-clocked policy. Extend the emulated-register KUnit tests with an acknowledgment beyond the old budget and a stuck noirq power-on that still returns an error and retains the on request for genpd. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
During platform-test resume the GPU's genpd_resume_noirq() path requests GFX active again. The failing register value 0x0f000b4f has target 0xf, actual state 0x4 and bit 11 set: the upstream power/clock is unavailable. The 100 us actual-state poll includes this parent wake interval, even though genpd has already made its software parent vote. Replace the wider active-state timeout with a separate bounded poll for bit 11 to clear on the T6000 PMGR GFX register only. Keep the normal 100 us actual-state budget after that condition clears; an active target or a cleared parent condition alone is not a successful power-on. Keep all other domains' budgets, including the existing strict-state policy. Use delay-based atomic polling for the parent so its bound does not require running timekeeping in the noirq/syscore window. The 10 ms parent ceiling is provisional pending hardware measurements. A parent that never becomes available or a missing actual-state ACK still logs an error and returns failure. Retain the system-sleep on request because genpd_sync_power_on() ignores errors in this path. Exercise delayed and missing parent acknowledgments, an actual state that stays clock-gated after parent availability, the unchanged budget for other domains and read failures in the emulated-register KUnit suite. Add a reproducible arm64 KUnit configuration. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.
T6000 GFX can time out during the GPU's
genpd_resume_noirq()power-on with target0xf, actual state0x4(clock-gated), and bit 11 set (upstream power/clock unavailable). genpd has already made its software parent vote, but that does not establish that GFX's physical dependency is ready.genpd_sync_power_on()ignores power-on errors, so a late transition can explain subsequent GPU recovery without proving the timeout harmless.Poll bit 11 separately for the T6000 PMGR GFX register (
0x3c0) only, with a provisional 10 ms ceiling. Once it clears, require the normal 100 µs actual-state acknowledgment. Use delay-based atomic polling for the parent condition so that its bound does not depend on running timekeeping. Other domains retain their original budgets, including the existing strict-state policy. Missing parents, missing actual-state acknowledgments, and read errors remain failures with error-level logging; no-auto-PM and system-sleep request retention remain intact.This remains a draft pending hardware timing and ordering evidence. The 10 ms parent ceiling is not a measured silicon bound. The trace must also check whether fabric restoration runs too late, and whether bit 11 can first assert after the initial parent check; a polling increase cannot fix a callback dependency.
Validation:
LLVM=1 W=1; all 10apple-pmgr-pwrstateKUnit tests passed in QEMU. The build has warnings in untouched files, with no diagnostic in the changed PMGR C files.drivers/pmdomain/apple/.kunitconfig.pmgr-pwrstate.git diff --checkpassed. Strict checkpatch passed apart from its generic new-file/MAINTAINERS reminder; the new configuration is explicitly listed in MAINTAINERS.