Repository navigation
drm/asahi: G14 firmware 27.2: run every performance state, and set the compute start word the 13.5 path sets - #2896
RyanTheTide wants to merge 3 commits into
Conversation
The G14 firmware-27.2 runtime reuses the 26.x submission front end (m3_submit, agx_uapi and their helpers), so it was built only with CONFIG_DRM_ASAHI_M3_T8122. Give it its own option, DRM_ASAHI_G14_V27_2 (default y), and build the shared front end when either user is enabled: - m3/mod.rs: agx_uapi, agx_compute, agx_attachments, agx_memory and m3_submit build with DRM_ASAHI_M3_T8122 or DRM_ASAHI_G14_V27_2. - m3_submit.rs: the M3 sink, queue constructor, render validation, CDM launch check, timeout handling and fence-timing profile build only with the M3 runtime; without it a render command gets EINVAL. task_comm() moves here from m3_client.rs, which now calls it here. - The G14 path's own code is gated on the new option. Like the M3 runtime, the option depends on DRM_ASAHI_G15: the firmware's UAT is adopted through that backend's handoff helpers (Uat::new_adopted, the G15 UAT table cleaning). Signed-off-by: Satya Benson <satya@benson.earth>
The G14 firmware-27.2 runtime refuses render commands, but nothing in GET_PARAMS says so. Graphics userspace therefore takes the device for GL: on phellos (J413) with the GPU published, kmsro picked the aurora render node for the internal panel, and the greeter's Hyprland and sddm-greeter-qt aborted after their first renders failed with EINVAL. Add DRM_ASAHI_FEATURE_COMPUTE_ONLY (bit 41; bits 39 and 40 are claimed by open PRs #2059 and #2523) and set it on that runtime. It is a property of the device, not of a board or chip list: Mesa can decline to create a graphics screen or a graphics queue on a device that reports it, and fall back to software rendering, while compute keeps working. Kernels without the bit keep their current behaviour. Signed-off-by: Satya Benson <satya@benson.earth>
…e compute start word the 13.5 path sets The 27.2 G14 runtime kept the GPU at its first performance state (globals +0x98 = 100). Two things kept the other states and some dispatches from working: - The temperature alarm's per-state table is copied from the 13.5 configuration, but the word before it (the 13.5 HwDataShared3 position of unk_8) stayed 0. The alarm then runs in every state, and at the upper states the firmware stops retiring work (no fault). No machine property describes the alarm's hysteresis or retry interval, so keep it off: a floor of the DT state count lies above every state. The state cap is then the DT ceiling, like +0x88/+0x8c. - The compute start operation keeps the 13.5 G14 StartCompute layout (unk_pointer +0x04, job parameters +0x0c, stats +0x14, queue +0x1c, VM slot +0x24). Its +0x28 word is 13.5's unk_28, which the 13.5 path sets to 1; with 0, an integer dot-product kernel and a maximum threadgroup-memory dispatch never retire. On a J473 (Mac mini M2) with firmware 27.2: all eight DT states run, fp32 3.5 TFLOPS instead of 1.0, the int8 dot-product and max_workgroup_memory.1 dispatches complete, the dEQP-VK compute subset is unchanged (738/776, 0 failures) and a 5-minute soak is clean (10 minutes with the two state words alone). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Review at 1bcdd7c.
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist review at live head 1bcdd7c0498ff7c7eab491542fef1357d4af5972 (base: satchlj/g14-v27-2-compute-only / #2610; 0 CI check runs because base is a feature branch rather than integration/aurora).
Code Verification
drivers/gpu/drm/asahi/gpu/v27_2.rs:119-120: Settingstream +0x28to1matches 13.5microseq::StartCompute::unk_28(drivers/gpu/drm/asahi/fw/microseq.rs:347, populated as0x1inqueue/compute.rs:145) forG14G(G < G14X).drivers/gpu/drm/asahi/gpu/v27_2.rs:811-814: Removing the hardcodedSTATE_CAP = 100and passing DTceiling = pwr.perf_max_pstate * 100toglobals +0x98aligns with+0x88/+0x8cand removes an artificial cap.drivers/gpu/drm/asahi/gpu/v27_2.rs:941-948: Offset0x62b4is indeed the word immediately before theHwDataShared3table at0x62b8..0x62f8(corresponding toHwDataShared3.unk_8, which 13.5 sets tocfg.shared3_unk = 5on T8112).
Checklist Summary & Blockers
- §3 Safety / §1 Cross-machine thermal protection (
drivers/gpu/drm/asahi/gpu/v27_2.rs:944-948): This change unlocks all 8 DT performance states (lifting peak compute from ~1.0 to ~3.5 TFLOPS) while explicitly disabling the firmware's per-state temperature alarm (put32(policy, 0x62b4, pwr.perf_states.len() as u32)places its floor above every state). Although thefast_die0PID (0x2270/0x22d4), SoC-hot (0x2f30), andmax_power_mwpower-budget controls remain populated, the only soak reported is 5 minutes on an actively cooled Mac mini (J473) reaching 41.5 °C — well below thermal throttling. Becausedriver.rs:395routes all(G14, G)T8112 Macs — including fanless M2 MacBook Airs (J413/J415) — throughgpu/v27_2.rs, please either:- prove on hardware that the remaining thermal/power controllers (
fast_die0/ppm) safely throttle sustained full-load compute at thermal equilibrium (especially on a passively cooled J413/J415 or thermal-stressed J473), or - clarify whether full 13.5
HwDataShared3parity (unk_0=1, unk_4=500, unk_8=5, unk_4c=1) still hangs withstream +0x28 = 1in place, and if0x62b4stays disabled, note whypolicy[0x62b8..0x62f8]still copiescfg.shared3_tab.
- prove on hardware that the remaining thermal/power controllers (
- §5 Evidence completeness: The J473 trial does not record the exact base
integration/auroracommit / kernel build identifier or0 failed unitsin the regression check, and the M2 Air 13.5 regression row is still listed underStill to run. - CI / Stack dependency: 0 CI checks ran on
1bcdd7c049(stacked on unmerged#2543→#2544→#2545→#2610). Cannot be approved or added toMERGETRAIN-LINUX4independently until CI runs green against the merged/target base (or folded into the parent series).
Checked & Clean
- §2 Production-ready: Works on default kernel command line with no new module parameters.
- §4 Clean-room & attribution: Single human commit (
Ryan Murray <ryan@aurorasilicon.org>), humanSigned-off-byonly, zero AI trailers in commit; PR body includesAssisted-by. - §6 Naming: Clean (Aurora/Borealis naming; no forbidden terms).
Assisted-by: LLM (Gemini 4 Neon)
|
Thanks, both. Point 1 is right. Unlocking the top states while the alarm is off isn't acceptable when the same backend reaches the fanless J413/J415. Plan:
Assisted-by: LLM (Claude:Opus 5.5) |
RyanTheTide
left a comment
There was a problem hiding this comment.
Independent source review at 1bcdd7c0498f. The current head still changes the alarm floor alongside the performance cap. The fan-cooled throughput row does not establish that the alarm remains active above the original cap. Keep this head draft. The compute start change can be reviewed independently at the existing limit, with the formerly hanging compute cases run again and no change to thermal handling.
|
MERGETRAIN6 source review at Assisted-by: LLM (Codex) |
3515e7d to
6a15a79
Compare
Problem. On G14 firmware 27.2 the compute runtime from #2544 holds the GPU at its first performance state (globals +0x98 = 100). Lifting that cap alone hangs the upper states (no MMU fault, the firmware just stops retiring work). Separately, at any state an integer dot-product kernel and a maximum-threadgroup-memory dispatch never retire, and the GPU stays unusable until reboot.
Change. One commit on top of #2610,
gpu/v27_2.rsonly:HwDataShared3keeps it). Nothing on the machine describes the alarm's hysteresis or retry, so the alarm stays off. With that, the state cap at +0x98 becomes the DT ceiling, like +0x88/+0x8c already are;StartComputelayout field for field, and +0x28 isunk_28, which the 13.5 path sets to 1.Everything comes from the DT; there are no chip gates or parameters.
Testing. Mac mini M2 (J473, T8112 G14G), firmware 27.2, distribution command line, no module options, one-boot trials of
integration/aurora+ #2543 → #2544 → #2545 → #2610 + this commit:dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.1passes (hangs without the change);Still to run.
max_workgroup_memory.128still hangs, with or without this change. There is no hung-command recovery on 27.2 yet. No row is needed on 13.5 machines (M2 Air): the driver only enters the 27.2 runtime when the GPU node'sapple,firmware-versionis 27.2.0, so this file never runs there.Rows and evidence detail
Bisection before the fix (cap in hundredths of the state index): states 1-5 stable (state 5 = 1110 MHz, fp32 2788 GFLOPS, 10-minute soak clean); states 6, 7 and 8 hang on the first heavy dispatch. With the floor word set, all 8 states run (fp32 float/float2/float4 3059/3244/3504 GFLOPS). We tried full 13.5 parity for the alarm (hysteresis 500, floor = the 13.5 value, retry 1) too. It still hangs
max_workgroup_memory.1at the top states, so the alarm stays off.Earlier row on the stack as is: #2544 (comment). Proposal comment with the inline patch: #2544 (comment). This PR is that patch as a branch (commit message corrected: the 10-minute soak was the state words alone, the full change soaked 5 minutes).
Satya, take it into the series in whatever form you prefer. If you fold it in, close this PR.
Assisted-by: LLM (Claude:Opus 5.5)