Skip to content

pmdomain: apple: wait separately for the T6000 GFX parent - #781

Draft
RyanTheTide wants to merge 2 commits into
aurora-wipfrom
fix/pmgr-gfx-resume-timeout
Draft

RyanTheTide wants to merge 2 commits into
aurora-wipfrom
fix/pmgr-gfx-resume-timeout

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 1, 2026 •

Copy link
Copy Markdown

T6000 GFX can time out during the GPU's genpd_resume_noirq() power-on with target 0xf, actual state 0x4 (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:

  • ARM64 kernel built with LLVM=1 W=1; all 10 apple-pmgr-pwrstate KUnit tests passed in QEMU. The build has warnings in untouched files, with no diagnostic in the changed PMGR C files.
  • KUnit covers delayed/missing parent, missing actual ACK after parent availability, ordinary-domain and parent-ready GFX timeout behavior, read errors, rollback, and no-auto-PM. The reproducible configuration is drivers/pmdomain/apple/.kunitconfig.pmgr-pwrstate.
  • git diff --check passed. Strict checkpatch passed apart from its generic new-file/MAINTAINERS reminder; the new configuration is explicitly listed in MAINTAINERS.
  • Hardware qualification is pending: first 50 platform freeze cycles with idle periods after GPU work, then another 50 for the 100-cycle acceptance requirement; zero GFX failures and sane hardware GPU rendering afterwards. Keep this PR draft until the measured parent sequence and fabric callback order support the change.

RyanTheTide and others added 2 commits November 1, 2026 19:40
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>
@RyanTheTide RyanTheTide changed the title pmdomain: apple: allow 10 ms for the active-state handshake pmdomain: apple: wait separately for the T6000 GFX parent Nov 1, 2026
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