Repository navigation
drm/asahi: g16: lay out G15G GLOBALS as the G15 family's 26B123 - #3173
Conversation
The 15-inch M3 Air (T8122 G15G) runs the G15 family's 26B123 InitData version, the same version as G15S, but its layout took G16G's GLOBALS runs. In this version the 25G83 words from +0xe28 on sit 5 bytes up, not 4, so the soft-fault word (25G83 +0xe28 = 3) landed one byte low and the firmware read 0 there. With soft faults off, an unmapped shader write faults the whole context instead of being dropped: Geekbench 6 Vulkan's Background Blur (resize_bilinear) wrote 29 KiB past an application buffer, the VM went into its sticky error state and the device was lost, on both linux#3163's head and main. The same workload passes on G16G (J713) and G16S (J616s), whose firmware default drops such writes. Use the G15S GLOBALS runs for G15G. The rest of the G15G layout is unchanged. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 9a1540ca4453.
Blockers: Finish the current CI run.
Checked: Reviewed the full diff and the human sign-off. The G15G layout now uses the existing Globals descriptor for the same InitData format. Layout selection and every other backend are unchanged. The exact J615 target ran the default kernel options and retained native graphics after wake.
Evidence
J615 M3 Air (T8122) at 9a1540ca4453, with the existing merged Mesa overlay, passed 8/8 initial Vulkan workloads. The 20-minute run completed 99/99 graphics and compute operations and 9/9 full Vulkan benchmark runs. All ten fresh Vulkan clients passed. The same boot passed one short RTC wake and post-wake Vulkan and OpenGL, with zero GPU faults, zero SELinux denials and zero failed units. The operator verified the saved fleet85 entry, successful boot, empty next entry and overlay cleanup after the trial.
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict at 9a1540c: no blockers. Merge once CI at head is green. Independent review: the author lane is AIRS-FLEET89, the reviewer is PR-BURNDOWN.
Blockers: none
Checked
- It is data only. The change adds one field (
globals: G15S_26B123.globals) to the existingG15G_26B123layout constant. The layout is still picked the same way, through the per-GPU hw data entry (g16/hw.rs:533initdata: &initdata::G15G_26B123). There is no newif, no chip or board check, and no firmware-version branch in the code. - No other layout changes.
G15S_26B123,V26B123,V25G83and the G16 entries are byte-identical; the diff against main is this file, +5/-0. - Matches the stated cause.
V26B123(the default G15G inherited) has GLOBALS runs[0,0x38)+0, [0x38,0xe48)+4. G15S has[0x38,0xe28)+4, [0xe28,0xe47)+5. So from 25G83 +0xe28 on, G16G's runs place every word one byte low, which is where the soft-fault word was read as 0. - Compile-time checks still cover it:
layout_fits(&G15G_26B123)and thestate_bound/power-slot asserts atinitdata.rs:880-884apply to the new runs. - J615 row at exact head
9a1540ca, as reported in the PR body: GB6 Vulkan 8/8 (0/8 before), soak gpubench 99/99 plus GB6 9/9, 10/10 fresh Vulkan clients, 0 fault, recovery or timeout lines, s2idle +1.
Notes, not blockers
- The out-of-bounds
resize_bilinearwrite in Borealis is a separate follow-up, as the PR's Not yet section already says. - I didn't rebuild or re-run the row. This review is source-level, against main
865cecee.
|
Hardware row at Booted
Restored the saved fleet85 kernel and verified an empty next entry, successful boot, enforcing SELinux and zero failed units. This run covers GPU correctness and stability at the current operating point. |
What
On the M3 Air (T8122 G15G, firmware 26B123), a shader write to an unmapped address kills the whole GPU context. Other Macs just drop such writes. Geekbench 6 Vulkan's Background Blur hits this on its first workload: one write lands 29 KiB past an application buffer, the VM goes into its sticky error state and the device is lost. It happens on #3163's head and on main.
The cause is the GLOBALS layout. G15G runs the G15 family's 26B123 InitData version, the same version as G15S, but #3163 gave it G16G's GLOBALS runs. In this version the 25G83 words from +0xe28 on sit 5 bytes up, not 4, so the soft-fault word (25G83 +0xe28 = 3) landed one byte low and the firmware read 0 there.
This PR gives G15G the G15S GLOBALS runs (
globals: G15S_26B123.globals). One line of data, no chip or board check; nothing else in the G15G layout changes, and no other machine uses this layout.Tested
9a1540caon main865cecee: non-default one-shot on the default fleet command line, Mesa from merged aurora-wipbc9c9269.Risk
Two-way (a plain revert undoes it) · T8122 G15G GPU on firmware 26B123 only. G16G, G16S and G15S layouts are untouched. The compile-time layout checks (
layout_fits) cover the new runs.Not yet
macsmc_soc_diethermal trips; until then the GPU holds S1, so the row says nothing about performance.Evidence
ef1c9856, same Mesa):G16: fault bank 0: ... va 0x4df9f46e80 (write unmapped level 0 ...)in Background Blur, Geekbench 6 exit 134. The same fault happened withASAHI_MESA_DEBUG=nosoft. A live-BO dump puts the faulting address 0x7300 past the end of a 576 KiB application buffer, in its guard gap.run(0xe28, 0xe47, 5), 9dc11d9).