Repository navigation
drm/asahi: let the G14 27.2 GPU use its full performance-state range - #3075
Conversation
The G14 27.2 runtime wrote the board's performance-state ceiling to two of the three Globals state selectors (+0x88, +0x8c) but left the third (+0x98) at 100, the first state above idle. That held the GPU at its lowest active state (about a third of its top clock on the M2) for every workload. G14 13.5, M3 27.2 and M4 27.2 write the ceiling to all three selectors. Do the same: the value comes from the board's performance-state table in the device tree, and the firmware's power and thermal controller (fast-die loop, thermal thresholds, SoC-hot alarm, all unchanged) decides how much of that range the GPU may use. The selector offsets move into the 27.2 ABI module so the host test checks them against the progress-check words. Signed-off-by: Ryan Murray <[email protected]>
|
J473 row: Evidence
|
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Verdict at Blockers: No source issue. The current J473 row measures several minutes under load. Record the planned sustained-load health row and the J413 13.5 shared build control before merge. Checked: The ceiling is the last index of the existing operating-points-v2 table. The change writes it in the same units as the other selectors, leaves the firmware power and thermal settings in place, and introduces no runtime switch. Exact ABI host tests pass 5/5 with warnings treated as errors. J473 A/B covers all eight Vulkan workloads and returns to saved fleet87. The performance gain comes with the higher measured GPU power and temperature stated in the PR. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: FINISH at 9f1d55b8
Blockers:
- CI (
host-tests): stillin_progressat9f1d55b8— wait for green completion before merge. (0 code or safety blockers.)
Checked: §1–§6 pre-PR checklist, full diff (drivers/gpu/drm/asahi/g14_v27_2_abi.rs, drivers/gpu/drm/asahi/gpu/v27_2.rs), commit hygiene (9f1d55b8), CI status (pr-text and readiness green, host-tests running), local g14_v27_2_abi.rs host tests (5/5 pass with -D warnings), and exact-head J473 A/B hardware row.
Evidence
- Code & safety audit (
drivers/gpu/drm/asahi/gpu/v27_2.rs,drivers/gpu/drm/asahi/g14_v27_2_abi.rs):- Removes hardcoded
STATE_CAP = 100at Globals+0x98and moves[0x88, 0x8c, 0x98]toGLOBALS_PSTATE_SELECTORS, writingpwr.perf_max_pstate * 100to all three selectors — matching G14 13.5 (initdata.rs), M3 27.2 (m3/m3_power_26.rs), and M4 27.2 (g16/fw/initdata.rs). - Bounds & malformed-DT safety verified in
RootV27_2::build:states.len()is validated to2..=16(COMMON26_HW_PERF_ROWS), strictly increasing frequency/power,perf_max_pstate == states.len() - 1(1..=15) matchinghwdata_b.max_pstate, and per-state core/SRAM voltages validated againstadt-perf-states-sram. Thuspwr.perf_max_pstate * 100is bounded to100..=1500with no overflow or OOB risk. - Power budget (
0x84 = pwr.max_power_mw), fast-die loop, thermal thresholds, SoC-hot alarm, sensor masks/coefficients, PID gains, and progress-check intervals are untouched. - No
unsafeadded or modified;put32writes within the0xe48-byte Globals buffer, andg14_v27_2_abi.rsunit tests check alignment, bounds, pairwise non-overlap of selectors, and disjointness fromGLOBALS_PROGRESS. - Scoped strictly to
CONFIG_DRM_ASAHI_G14_V27_2(RootV27_2::build); zero runtime impact on G13, G14 13.5, G15, G16, G17, or G18.
- Removes hardcoded
- §1 No model gating: Pass — no chip/board/firmware gates added; ceiling comes from DT
operating-points-v2. - §2 Production-ready: Pass — default cmdline, removes hardcoded cap (
STATE_CAP = 100), no new module params or workarounds. - §3 Safety: Pass — all limits remain DT/hardware-derived and firmware power/thermal controls are intact.
- §4 IP & attribution: Pass — single commit
9f1d55b83b4ffd383bdc08d27895d4c7bbdd2bcbbyRyan Murray <[email protected]>with matching humanSigned-off-by:; clean title, body, and comments; no copyrighted Apple material. - §5 Evidence & PR structure:
What:,Tested:,Risk:(two-way), andNot yet:present;pr-textgreen. Exact-head J473 (M2 mini, G14G 27.2) A/B row reports GB6 Vulkan 8/8 twice per kernel (152.8/152.4 s → 95.9/95.4 s), peak rail voltage 599 mV → 820 mV (1110 MHz), GPU power 1.9 W → 8.9 W, GPU die 37.1 C → 46.2 C, piglitshader-mem-barrierpass, 0 firmware timeouts / Oops / failed units after restore. - §6 Naming: Pass.
- CI at
9f1d55b8:pr-text / pr-textSUCCESS,readiness / readinessSUCCESS,host-testsIN_PROGRESS (rustc --test -D warningsong14_v27_2_abi.rspassed 5/5 locally). - Non-blocking notes:
- Include explicit
0 SELinux denialsin the J473 regression check alongside the planned sustained-load thermal soak and J413 13.5 control row noted in the thread. - Optional nit:
pstate_selectors_are_aligned_distinct_words_of_the_globalscould also assert disjointness against thepoweroffsets (0x58..0x84) in addition toGLOBALS_PROGRESS(currently disjoint by inspection:0x84 + 4 == 0x88).
- Include explicit
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: MERGE at 9f1d55b8
Blockers: none
Checked: host-tests is now green alongside pr-text and readiness at exact head 9f1d55b83b4f. G14 27.2 P-state selector bounds, thermal/power-budget isolation, §1–§6 policy hygiene, and exact-head J473 A/B hardware results were verified in the prior pass on this same head.
Evidence
- Exact head:
9f1d55b83b4ffd383bdc08d27895d4c7bbdd2bcb(MERGEABLEontomain). - CI at head:
pr-textPASS,readinessPASS,host-testsPASS. - Prior review: Promoting from
FINISH(review #6042366722) toMERGEnow that all checks are green.
…e range" This reverts the merge of aurora-silicon#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 aurora-silicon#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]>
What: The G14 firmware 27.2 runtime writes the board's performance-state ceiling to two of the three Globals state selectors (+0x88, +0x8c), but it set the third (+0x98) to 100. That is the first state above idle, so on the M2 mini the GPU stayed at its lowest active operating point (444 MHz in the T8112 GPU OPP table) for every workload. G14 13.5, M3 27.2 and M4 27.2 write the ceiling to all three selectors, and this change does the same. The ceiling comes from the board's performance-state table in the device tree. The firmware's power and thermal controller (fast-die loop, thermal thresholds, SoC-hot alarm) is unchanged and still decides how much of that range the GPU uses. The selector offsets move into
g14_v27_2_abi.rs, so the host test checks them against the progress-check words.Tested: J473 (M2 mini, G14G, firmware 27.2), same boot recipe for both kernels (default cmdline), A = main's code (#3055), B = this commit on top:
arb_shader_image_load_store-shader-mem-barrierpasses on both.g14_v27_2_abi.rs: 5/5 pass, 1 of them new.Risk: two-way · only Macs running the G14 firmware 27.2 runtime (J473 today; any G14G Mac on 27.2). The GPU draws more power under load, which is the intended behaviour. The 13.5 runtime and other GPU generations don't run this code.
Not yet:
Details
perf_max_pstate * 100.initdata), as do M3 27.2 (m3/m3_power_26.rs) and M4 27.2 (g16/fw/initdata.rs,PSTATE_SELECTORS).STATE_CAP = 100was the only cap. The power-policy initial-state words (+0x2c/+0x30 = base state) are starting values, which the firmware moves away from: M3 writes 1 there.Evidence
Our own traces,
traces/gpu/20261125-m2gpu-next/:20261125-020707-j473-h9b-m2h7(A) and20261125-021804-j473-h9b-m2n1(B):row/hang/telemetry.csv(1 s SMC samples),telemetry-summary.txt,gb6-*.txt,marks.txt.*-nogb6(earlier tries): same voltage picture (max 600 mV with A, 825 mV with B under piglit and vkcube).