Skip to content

GPU: enable M2 Max compute preemption and preserve explicit overrides - #68

Merged
chriskearney merged 2 commits into
integration/aurorafrom
fix/m2max-compute-preemption
Oct 11, 2026
Merged

chriskearney merged 2 commits into
integration/aurorafrom
fix/m2max-compute-preemption

Conversation

@chriskearney

@chriskearney chriskearney commented Oct 11, 2026 •

Copy link
Copy Markdown

M2 Max can starve an animating compositor during long compute dispatches because its legacy compute queue disables firmware preemption. Bring in Joshua Warren’s PR #16 with a narrow integration successor: automatic preemption on G14X T6021 (M2 Max), retain the existing Debug0 opt-in, and let explicit compute_preempt=0/1 override automatic selection.

M2 Pro/Ultra keep their current defaults and can opt in explicitly while their hardware qualification remains open. Vertex/fragment priorities, compute backing and firmware timeouts, and M3 HAL200 submit paths are unchanged.

Validation: 12,960 compiled policy/priority combinations use the production Rust version macro and priority table; the original broad/default policy and four mutated policies fail the successor’s controls. Focused ARM64 compilation of the complete Asahi object passes with Clang 22.1.8 and Rust 1.93.1. Independent adversarial review of the successor passes, including all four hardware-configuration call sites and the frozen policy controls.

Joshua’s hardware evidence in #16 covers M2 Max: 152/690 ms dispatches complete correctly beside an animating page without the stock watchdog storm. Those are the author’s reported results, not a new run here; his candidate also carried an unrelated timeout fix that remained inactive in the passing run. No new hardware, scheduling/teardown or Pro/Ultra acceptance is claimed.

Related #25; supersedes #16 while retaining Joshua’s authorship. No release assets change.

joshuaswarren and others added 2 commits October 11, 2026 11:37
The compute work queue pins its priority fields to the highest entry,
preventing the firmware from switching compute work out for other clients.
On M2 Max, long compute dispatches beside an animating compositor trigger
watchdog timeouts, incorrect compute results and stalled display fences.

Preserve the requested priority fields on G14X so firmware can preempt
compute work. Add compute_preempt: -1 selects the GPU default, 0 retains
the disabled-preemption priority fields and nonzero overrides enable it.

Signed-off-by: Joshua Warren <[email protected]>
Signed-off-by: Chris Kearney <[email protected]>
Pass the existing hardware configuration to each legacy workqueue. Automatic mode enables preemption on G14X T6021 and retains the Debug0 opt-in; explicit compute_preempt overrides take precedence. M2 Pro and Ultra remain explicit opt-in targets. Preserve all priority fields outside the disabled compute case.

Signed-off-by: Chris Kearney <[email protected]>
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.

2 participants