Repository navigation
drm/asahi: set the G14 27.2 firmware progress checks and compute watchdog - #3055
Conversation
…hdog The G14 firmware 27.2 runtime armed the firmware's progress recovery (HwDataB +0xfc4) but left the Globals words that configure it at zero: the 3D/TA/compute progress-check intervals (+0x998/+0x99c/+0x9a0), the compute context-switch and kill timeouts (+0x9c8/+0x9cc), the relaxed compute kill timeout (+0x24), command submission enabled (+0x78) and +0xe28. The firmware then timed out ordinary work within a second or two. The J473 (M2 mini) lost piglit arb_shader_image_load_store-shader-mem-barrier to a TA timeout in its first subtest, and Geekbench 6 Vulkan to a compute timeout in Background Blur. Both complete on the J413, the same G14G on firmware 13.5, whose runtime sets these words. The 27.2 Globals object has the same 0xe48-byte layout on M3 and M4. Their 27.2 runtimes write these words with these values (m3_power_26, g16/fw/initdata). Write them the same way. The exception is the TA interval: it uses the 100 polls the M3 runtime uses for long vertex loops (m3_config), not 10. The values live in g14_v27_2_abi.rs with a test that they fit the object and leave the power words alone. The idle power-off delays (+0x9b8..+0x9c0) are not touched. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Independent source review at The TA progress interval is the one intentional difference. The cited M3 override is in the legacy InitData layout. Both of the linked 27.2 writers use the shorter interval. Please document the reason for taking the longer interval on the current ABI, with the J473 evidence that distinguishes valid long TA work from a stalled workload, and name the final currently unlabeled word or cite its public ABI definition. If a timeout is a hardware-protection limit, it needs the machine's value under the fleet safety rule. H6 isolates a useful direction. Please post the exact H7 row without the recovery PR, with the normal shader barrier and Vulkan workload results, preserved desktop and post-restore health. The earlier G13 and G16/G17 peer request and the same-G14 legacy-firmware control still apply. All workflow-filter checks also need to run against Assisted-by: LLM (Codex) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR review at exact head 62420ea802f9b4b7f4caee12d1accc6bad6097c5 — holding approval (COMMENT) pending standalone H7 hardware/regression evidence, resolution/justification of the TA progress interval (0x99c = 100 vs 10), and CI checks running on main.
Technical & ABI Verification
- Globals layout & bounds (
g14_v27_2_abi.rs,gpu/v27_2.rs):GLOBALS_BYTES = 0xe48matches the shared 27.2Globalssize inm3/m3_power_26.rsandg16/fw/initdata.rs. All 8 entries inGLOBALS_PROGRESSare 4-byte aligned, strictly within0..0xe48, written viaput32beforecrate::pgtable::clean_poc(data.as_ptr(), data.len()), and disjoint from the existing Globals writes (0x58/0x5a/0x5c/0x6e/0x84/0x88/0x8c/0x98), untouched idle power-off words (0x9b8..0x9c0), and the runtime idle generation counter (0xe40). - Cross-generation & firmware isolation: Strictly isolated to
CONFIG_DRM_ASAHI_G14_V27_2,ProbeConfig::LegacyWithG14Handoff(apple,agx-t8112/ G14G), andapple,firmware-compat == [27, 2, 0](driver.rs:203,404). G13, G14X, G14G on 12.4/13.5, G15, G16, G17, and G18 do not execute any changed code. - Host test verification: Ran
rustc --test -D warningsondrivers/gpu/drm/asahi/g14_v27_2_abi.rsat62420ea802f9b4b7f4caee12d1accc6bad6097c5: 4/4 passed, 0 warnings. - Word-by-word cross-check & open technical items:
- Seven of eight entries (
0x24=3000,0x78=1,0x998=40,0x9a0=250,0x9c8=40,0x9cc=50,0xe28=3) match both other0xe48-byte 27.2 builders (m3/m3_power_26.rs:222-236andg16/fw/initdata.rs:518-528), and the named timeout/interval fields match G14 13.5 (initdata.rs:734,797-813). - Blocking clarification — TA interval
(0x99c, 100)vs10: Every other 27.2 builder (m3/m3_power_26.rs:229,g16/fw/initdata.rs:522,g17/fw/m5/initdata.rs:1044) and G14 13.5 (initdata.rs:798) use10. Notably, the PR confirms J413 (G14G on 13.5, whereprogress_check_interval_ta = 10) passes bothshader-mem-barrierand Geekbench 6 Vulkan, while the citedm3_config.rs:126override (+0x980) is on the legacy 14.8.3 InitData layout (from a J514S trace). Since the J473 failure occurred with0x99c = 0, please either align0x99cto10or provide J473 27.2 evidence showing10false-triggers on valid TA work while100still allows firmware TA recovery to fire well inside the 5000 ms hostCOMMAND_TIMEOUT_MS(g14_v27_2.rs:52) without tearing down the runtime first. - Minor —
+0xe28 = 3documentation & test guard:+0xe28is currently unlabeled in the doc comment; noting explicitly that it is an unnamed 27.2 Globals constant shared withm3_power_26.rs/g16/fw/initdata.rs(not a hardware-protection parameter) would clarify §3 compliance. Optionally,progress_words_fit_the_globals_and_leave_power_words_alonecould also guard0xe40(runtime idle generation counter) and0x9b8..0x9c0(untouched idle delays) against future overlap.
- Seven of eight entries (
§1–§6 Checklist Summary
- §1 No model gating: Pass — no new chip/SoC/board/firmware-version gates; executes solely within the existing
apple,firmware-compat = [27, 2, 0]runtime. - §2 Production-ready, no hacks: Hold on
(0x99c, 100)justification above. Otherwise clean: works on the default kernel command line with no new parameters, sleeps, or disabled checks. - §3 Safety: Pass — power/thermal controller, power ceilings (
0x84/0x88/0x8c/0x98), and idle power-off delays (0x9b8..0x9c0) are untouched; these are firmware progress-check and compute watchdog intervals, not electrical/thermal protection limits. - §4 Clean-room & attribution: Pass — single commit
62420ea802f9b4b7f4caee12d1accc6bad6097c5carries human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and humanSigned-off-by:only, with zero AI trailers in commit history and clean-room implementation. - §5 Evidence & CI (blocking for approval):
- Exact-head standalone HW evidence (H7): Referenced in the PR body ("see the comment below") as the standalone run without
#3041, but not yet posted. Please post the H7 J473 results at exact head (piglitshader-mem-barrier, Geekbench 6 Vulkan, preservedgnome-shellPID, post-runvkcube/vulkaninfo) plus the §5 regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors). - Legacy-firmware control: J413 (G14G 13.5) regression row noted under "Still to run".
- CI status:
statusCheckRollupis empty ([]) because.github/workflows/*.yml(includinghost-tests.yml) still trigger onbranches: [integration/aurora, aurora-wip]and are waiting onaurora-silicon/linux#3053to switch triggers tomain. Holding approval until CI runs green onmain(localrustc --test -D warnings g14_v27_2_abi.rspassed 4/4).
- Exact-head standalone HW evidence (H7): Referenced in the PR body ("see the comment below") as the standalone run without
- §6 Naming: Pass.
Assisted-by: LLM (Gemini 4 Neon)
|
Exact-head J473 row (H7) at 62420ea on main a3d477d, without the recovery PR. Default cmdline, GNOME on both monitors, bystander glxgears; our own traces.
Before this change, both workloads were timed out by the firmware on every run (rows H1-H5). On the TA interval: I'm now testing the 27.2 parity value of 10 on the J473 (H8). If it passes, I'll switch to 10 so there's no special case. Answers to the other points follow with that row. |
There was a problem hiding this comment.
Source review of exact head 62420ea802f9. No blocker. One open question, with the row that settles it.
Checked.
- I compared all eight writes against the two 27.2 writers in the tree.
m3/m3_power_26.rslines 222-236 andg16/fw/initdata.rslines 518-528 write the same offsets with the same values for0x24,0x78,0x998,0x9a0,0x9c8,0x9ccand0xe28. - The writes happen inside the existing Globals construction, before
clean_poc. No power or idle word changes:0x9b8..0x9c0are left alone, as the test asserts. - The code runs only on the runtime that the handed-over firmware selects.
- The TA interval of 100 has no 27.2 source. Both 27.2 writers set
0x99cto 10, and so does the 13.5 G14 runtime (progress_check_interval_ta: 10). The 100 comes fromm3/m3_config.rs:128(TA_PROGRESS_INTERVAL), which belongs to the older InitData path, not to the 27.2 Globals the M3 runtime builds inm3_power_26.rs. H6/H7 show the fix works with 100, but they do not show that 10 fails. Please run the same H7 row at this head with only0x99cset to 10: piglit shader-mem-barrier, plus Geekbench 6 Vulkan Background Blur.- If 10 passes, use 10, so all three runtimes agree.
- If 10 times out, keep 100 and put that trace in the commit message as the reason. The GPU firmware's progress recovery then waits about 10x longer before it kills a genuinely stuck vertex workload on this runtime, which matters for the separate recovery work (#3041).
- Test nit. The
powerlist inprogress_words_fit_the_globals_and_leave_power_words_alonerepeats the offsets thatRootV27_2writes. If those move into namedg14_v27_2_abiconstants that both the writer and the test use, the overlap check stays correct when a power word is added.
|
Merge readiness at
Areas: Updated by pr-readiness on every push, edit and review, and every 30 minutes. Rules: merge policy · labels. |
|
Answers to the review at TA progress interval (+0x99c): keeping 100. I tested the 27.2 parity value of 10 on the J473 (row H8: main + this PR with +0x99c = 10, otherwise the same as H7).
That is one sample at 10, so I don't claim 10 always crashes. But it is the only distinguishing J473 evidence there is, and it points away from 10. 100 is also the interval the M3 runtime settled on for valid long TA work ( +0xe28: our trees have no public name for it. The 13.5 Hardware-protection limits: none of these eight words is one. They are firmware progress-poll intervals and compute watchdog timeouts, which decide when the firmware declares GPU work stuck. Thermal, power and voltage words are untouched; they still come from the existing T8112 configuration and ADT. H7: posted above. It is the exact head without the recovery PR: both workloads pass, 0 timeouts, desktop preserved, production restored and verified. Peers and legacy control: this code runs only on the G14 27.2 runtime, which is selected by the firmware the Mac hands over. G13, G15, G16 and G17, and the J413 on 13.5, never call it. The J413 13.5 row comes with the next fleet cut. CI has not run on any PR since Evidence: |
|
Verdict at Blockers: Record the J413 shared-path regression and the combined candidate row before merging. Checked: The exact H7 branch uses the longer interval and completed all eight Geekbench Vulkan workloads. H8 was a separate child changing the interval and its test expectation. It lost the GPU during Background Blur, and both fresh Vulkan checks then failed. The lab restored and verified fleet87. The shorter setting stays out of the merge candidate. Hosted host-tests passed on the exact PR head. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: MERGE at 62420ea802f9
Blockers: None. All items from the earlier review at 62420ea802f9 are resolved.
Checked:
- §1 No model gating & cross-generation isolation: Strictly confined to
CONFIG_DRM_ASAHI_G14_V27_2,apple,agx-t8112(ProbeConfig::LegacyWithG14Handoff,driver.rs:203), andapple,firmware-compat == [27, 2, 0](driver.rs:404). G13, G14X, G14G on 12.4/13.5 (J413), G15, G16, and G17 never executeRootV27_2::build()or readGLOBALS_PROGRESS. - §2 Production-ready & TA interval (
+0x99c = 100): Default kernel command line, no new parameters, sleeps, or disabled checks. Seven of eight entries (0x24=3000,0x78=1,0x998=40,0x9a0=250,0x9c8=40,0x9cc=50,0xe28=3) matchm3/m3_power_26.rs:222-236andg16/fw/initdata.rs:518-528(with named intervals/timeouts matching G14 13.5initdata.rs:734,797-813and G17g17/fw/m5/initdata.rs:1042-1054). Row H8 resolves the single divergence:+0x99c = 10crashed GPU firmware (RTKit exception EL1t,ESR 0x96000044,FAR 0) during Geekbench 6 Vulkan Background Blur on J473, whereas+0x99c = 100(matchingm3/m3_config.rs:128and well belowcl = 250) passed cleanly in both H6 and H7. - §3 Safety: All 8 writes are 4-byte aligned, within
GLOBALS_BYTES(0xe48), duplicate-free, flushed withclean_poc()prior to firmware boot, and disjoint from power/thermal/pstate words (0x58/0x5a/0x5c,0x6e,0x84,0x88,0x8c,0x98), thepowermirror (0x6a0), idle power-off delays (0x9b8..0x9c0), and the runtime idle generation counter (0xe40). None is a hardware-protection limit. - §4 Clean-room & attribution: Single commit
62420ea802f9b4b7f4caee12d1accc6bad6097c5carries human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and humanSigned-off-by:only, with clean-room implementation and own traces (traces/gpu/20261124-m2gpu-hang/). - §5 Evidence & CI: Exact-head standalone J473 (G14G, firmware 27.2) row H7 at
62420ea8onmain(a3d477d0) passes piglitshader-mem-barrier(145/145) +qualifiersand all 8 Geekbench 6 Vulkan workloads with 0 firmware timeouts, 0 Oops, preservedgnome-shellPID,vkcube/vulkaninforc=0, and verified production fleet87 restore (Enforcing, 0 failed units, 0 AVC). Because this path is not shared with 13.5, the J413 13.5 regression row on the next fleet cut is non-blocking. Hostedhost-testspassed on exact head; local ABI host tests pass 4/4 with-D warnings. - §6 Naming: Clean.
- Non-blocking nits (for follow-up only): Moving the existing Globals power-word offsets into shared
g14_v27_2_abiconstants (and including0x9b8..0x9c0and0xe40in the overlap test) would keep the test synced automatically; theNot yet:line in the PR body about CI can also be dropped now thathost-testspassed on62420ea802f9.
Evidence
- Exact head verified:
62420ea802f9b4b7f4caee12d1accc6bad6097c5(PR#3055,OPEN,MERGEABLEonmaina3d477d03f8e) - Local host ABI check:
rustc --test -D warnings drivers/gpu/drm/asahi/g14_v27_2_abi.rs-> 4/4 passed, 0 warnings - Hosted CI on exact head:
host-tests:success(https://github.com/aurora-silicon/linux/actions/runs/45395231541/job/138449110459)readiness / readiness:success(https://github.com/aurora-silicon/linux/actions/runs/45396368367/job/138453135383; follow-up edit run45400798988queued)
- Hardware rows:
- H7 standalone exact head (
traces/gpu/20261124-m2gpu-hang/20261124-220044-j473-h7): J473 (M2 mini, G14G 27.2), default cmdline, piglit 145/145 +qualifierspass, Geekbench 6 Vulkan 8/8 pass (rc=0), 0 timeouts/Oops,gnome-shellPID preserved, fleet87 restored (Enforcing, 0 failed units, 0 AVC) - H8 TA interval control (
traces/gpu/20261124-m2gpu-hang/20261125-000429-j473-h8):+0x99c = 10crashed firmware in Geekbench 6 Background Blur (RTKit EL1t exception,ESR 0x96000044,FAR 0)
- H7 standalone exact head (
|
J413 row: This runtime does not run the changed code; the row checks the shared build for regressions.
Evidence
|
What: The G14 firmware 27.2 runtime armed the firmware's progress recovery but left every Globals word that configures it at zero: the 3D/TA/compute progress-check intervals, the compute context-switch and kill timeouts, the relaxed kill timeout, command submission enabled and +0xe28. As a result the firmware timed out ordinary work within a second or two. On the M2 mini this killed piglit
arb_shader_image_load_store-shader-mem-barrier(TA) and Geekbench 6 Vulkan Background Blur (compute). This change writes those words with the values the M3 and M4 27.2 runtimes use for the same 0xe48-byte Globals layout.Tested: J473 (M2 mini, G14G, firmware 27.2) at
62420ea8on main (row H7), default cmdline, GNOME on both monitors with a bystander glxgears:qualifierspasses.Before this change both workloads were timed out on every run (rows H1-H5). The KUnit/host test passes 4/4.
Risk: two-way · only Macs running the G14 firmware 27.2 runtime (J473 today; any G14G Mac on 27.2). The 13.5 runtime and other GPU generations don't run this code.
Not yet:
main: no workflow has run sinceintegration/aurorawas renamed.Details
m3/m3_power_26.rs) and M4 27.2 (g16/fw/initdata.rs) write the same values, except +0x99c, which is 10 there.unk_e28is in HwDataA, not Globals. Both 27.2 writers set it to 3.g14_v27_2_abi.rsasGLOBALS_PROGRESS. Its test checks that they fit the object, are aligned and non-zero, and don't overlap the power words.Evidence
Our own traces,
traces/gpu/20261124-m2gpu-hang/:20261124-210525-j473-h6): this change plus drm/asahi: recover from G14 firmware 27.2 command timeouts and faults per client #3041; both workloads pass.20261124-220044-j473-h7): exact head on main; both workloads pass, 0 timeouts.20261125-000429-j473-h8): TA interval 10; piglit passes, firmware crash in Background Blur.