Skip to content

Revert "drm/asahi: let the G14 27.2 GPU use its full performance-state range" - #3091

Merged
RyanTheTide merged 1 commit into
mainfrom
m2gpu/revert-3075
Nov 24, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
m2gpu/revert-3075

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: Reverts #3075 (merged as 1b09b76). With all three Globals state selectors at the board's ceiling, the M2 mini's GPU reaches the 944 mV operating point, and the G14 firmware 27.2 then hangs intermittently under sustained load. A native GL render (fragment never retired) or a deep compute queue (commands fetched, never retired) times out with FAULT_INFO=0 and no firmware timeout event. Main has no per-client recovery, so every GPU client loses its device, gnome-shell included. This restores +0x98 = 100 until the firmware's behaviour at the higher states is understood.

Tested: J473 (M2 mini, G14G firmware 27.2), A/B on the same harness and boot recipe: fleet88 Stage 2, default cmdline, gpubench GL native plan up to 5 times, stopping at the first GPU timeout.

The exact-head row on this revert's own kit follows.

Risk: two-way · J473 and any G14G Mac on the 27.2 firmware: the GPU goes back to the 444 MHz cap, about 1.6x slower in Geekbench 6 Vulkan than with #3075, which is the state fleet88 ships. No other runtime runs this code.

Not yet:

  • The real fix: find what the 27.2 firmware needs at the higher states. Possibilities are something the power or thermal controller words still lack, or a timeout that has to scale with the clock. Then raise the cap again, with a gpubench soak as the gate rather than piglit and Geekbench 6.
Evidence

Our own traces, traces/gpu/20261125-m2gpu-next/:

…e range"

This reverts the merge of #3075 (1b09b76). With all three Globals
state selectors at the board's ceiling, the M2 mini's GPU runs up to
the 944 mV operating point, and the G14 firmware 27.2 then hangs under
sustained load. Both a native GL render (fragment never retired) and a
deep compute queue (commands fetched but never retired) time out with
no MMU fault and no firmware timeout event, and the GPU is lost for
every client.

The same kernel with +0x98 back at 100 ran the gpubench GL plan five
times in a row with every case passing and no timeout. Its rail never
went above 600 mV. The rows that justified #3075 (piglit and Geekbench
6) did not reach these hangs.

Restore the cap until the firmware's behaviour at the higher states is
understood.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners November 24, 2026 20:09

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source review at eea5439e: no blockers for the revert. Its reverse patch ID matches the original #3075 merge against its first parent, with only the two original files touched. The four retained G14 ABI tests passed locally. The J473 comparison supports restoring the previous cap: the high-state run lost the GPU in loop 1, and the restored-cap run completed 5/5 loops at 43/43 each.

The exact-head J473 row and hosted checks are still pending.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Independent source pass at eea5439ec219. I compared the first-parent change from #3075 to this PR. Across both files, every added line is removed and every removed line is restored. git diff --check passes. There are no source blockers for restoring the previously shipped range.

The paired J473 run supports the revert: the full range timed out on its first run, the earlier range finished five runs of 43/43 checks, and the saved fleet88 boot was verified after both arms. The owner’s exact-head signed J473 run and hosted checks remain the qualification for this head.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 24, 2026
@github-actions

Copy link
Copy Markdown

Merge readiness at eea5439e: not ready yet

Check Detail
CI at head ok 2 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA eea5439e, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · J473 and any G14G Mac on the 27.2 firmware: the GPU goes back to the 444 MHz cap, about 1.6x slower in Geekbench 6 Vulkan than with #3075, which is the state fleet88 ships. No other runtime runs this code.

Areas: area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J473 row: eea5439e on the J473 (M2 mini, G14G firmware 27.2): pass. gpubench GL native plan 5/5 loops, 43/43 ok each, 0 GPU timeouts, rail max 600 mV, 0 failed units after restoring fleet88.

Evidence

traces/gpu/20261125-m2gpu-next/20261125-080747-j473-ab-m2rv1 (kit 7.3.0-aurora-m2rv1 = main 54784b42 with this revert; same harness as the A/B in the PR body: row/hang/klog-*.txt, gpu-mv.txt).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Verdict at eea5439ec219: MERGE. The independent source comparison found that this restores both files exactly to the range shipped before #3075. The current host, PR text and readiness checks passed. The exact J473 27.2 trial completed five runs of 43/43 with zero GPU timeouts and restored the saved fleet88 boot.

The changed range is specific to the G14 27.2 path. The J413 13.5 smoke remains useful as a shared-driver follow-up. The broader signed fleet89 qualification comes from the merged tip. #3091 (comment)

@RyanTheTide
RyanTheTide merged commit 645f7cd into main Nov 24, 2026
3 of 4 checks passed
RyanTheTide added a commit that referenced this pull request Nov 24, 2026
The comments added with the compute flush_stamps word said that a clear
word stalls a compute queue that writes user timestamps. A later A/B on
the M2 mini showed that those hangs came from the raised GPU
performance-state cap (reverted in #3091). With the cap restored, the
same compute loop ran 24 times clean. Say only why the word is set: the
27.2 render commands and the M3 27.2 compute command set it.

Comment-only change.

Signed-off-by: Ryan Murray <[email protected]>
funkzy pushed a commit to funkzy/linux that referenced this pull request Nov 25, 2026
… GPU range

Since aurora-silicon#3091 the G14 GPU on firmware 27.2 has been capped at its first
operating point (444 MHz): at the higher states the firmware stalled
compute work under load (fetched > retired, no fault) and held the top
voltage even when idle. The 27.2 builder left most of the firmware's
power data zero. The 27.2 records keep that data in the 13.5 layout,
and this driver already builds all of it for the 13.5 InitData:

- Globals: HwDataShared1 at +0xec and HwDataShared2 at +0x1b4, which
  includes the G14 curves computed from each operating point's
  frequency and voltage.
- Power record: the average-power filter at +0x10..+0x20 and
  HwDataShared3 at +0x4f0.
- Hardware data: the 13.5 HwDataB words from the power sample period
  to the fragment count, at the chip id's distance (power sample period
  at +0xff4, fragment count at +0x10a4); the SRAM power coefficient of
  each operating point (sram_k); the identity state index map. Drop the
  second MHz series at +0x1924, which is not part of the block.
- Globals +0x9b8/+0x9bc/+0x9c0, the compute back-off words that the M3
  and M4 27.2 runtimes also set.

Copy these values from the 13.5 InitData: same builders, same chip
configuration and DT operating points, with no new constants. offset_of
checks tie each destination to the 13.5 structures.

With the data in place, publish the ceiling at Globals +0x98, as +0x88
and +0x8c already do. The firmware then governs the whole range itself:
the rail follows the load (about 0.68-0.82 V instead of a fixed 0.94 V).

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide deleted the m2gpu/revert-3075 branch November 27, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant