Repository navigation
drm/asahi: g16: add T8122 G15G on firmware 26B123 as data rows (stacked on #3132) - #3163
Conversation
Run the M3 (T8122, G15G) GPU on the macOS 27.2 firmware (26B123) through the shared g16 backend, as #3132 does for T6030 G15S. The T8122 values come from the m3 27.2 series (linux#2781): - one firmware build row: the C0 TEXT digest measured on the J615, normalized by zeroing the GKTS and ECAP entropy values at 0x60f60 and 0x61043, which is the g16 normalization with no boot-filled ranges; - one handoff layout: TEXT 0x64000, fw-data 0xbc000 (DATA 0xb4000 plus the 0x8000 shared read-only tail), third segment at UPPER + 0x118000, handoff version 2; - the G15G InitData layout: the G16G 26B123 objects and positions with this image's version word (0x...039404b8), the T8122 register blocks, the empty-slot write modes, two extra performance words (+0x2f34, +0x6ac8) and the shared3 state word (+0x62b4), which gets the number of performance rows taken from the machine's ADT; - the GPU identity under masks (family 7, variant 2, revision 0x20, one die and one cluster), the ps_gfx offset 0x1e0, one cluster of ten core slots, no AXI2AF writes, no PMP vote. Selection is match data only. The apple,agx-t8122 row names the handoff marker aura publishes on this SoC (apple,m3-handoff-version) and the firmware-compat values it owns (<27 2 0>). The g16 driver probes the node only when the handoff describes the G15G layout and firmware-compat is 27.2, and the m3 probe steps aside in exactly that case, so the m3 14.8.3 and 26.6.2 paths are unchanged. T8132 and T6030 keep their exact identity words and handoff property. Power and thermal follow the shared backend: the DVFS rows, power sampling and limiter words come from the machine's ADT and the thermal limits from its thermal-zone trips. No power budget or FastDie temperature is carried over from the m3 series; the POWER object stays zero, as on G16G and G15S. Signed-off-by: Ryan Murray <[email protected]>
…d-l2 A boot loader that also serves the older M3 runtime lists the shared L2 page-table reservation twice on the GPU node: first as "pagetables-l2", then as "shared-l2" in the canonical six. On the 15-inch M3 Air both names reference the same phandle, so it is one reservation under two names, but the exact six-entry check refused the whole handoff. Accept the seven-entry form only when the leading entry is named "pagetables-l2" and references the same reservation as "shared-l2". A second or unknown reservation still refuses the contract, and the six canonical regions are looked up and validated by name as before. Signed-off-by: Ryan Murray <[email protected]>
|
Progress at New commit J615 one-shot on the default command line:
Where it stops: lab-only trace builds, not pushed, put the EINVAL in
Decision needed (safety-values rule), @DjDeveloperr:
The next lab step is a one-word trace telling which of the five inputs is zero. |
The low-peak (PPM) limiter's IIR filter spans the ADT's limiter time
constant divided by the GPU power sample period. On the 15-inch M3 Air
both are the same, so the filter spans one period, and encode_for
refused it ("periods < 2"), which stopped the 27.2 start with EINVAL
before the firmware ran.
A one-period filter is valid: its pole is (1 - 1) / 1 = +0.0 and its
gain 1 / 1 = +1.0, so each sample is taken as is. Accept periods >= 1
and keep the limiter on, with every input still from the machine's ADT.
f32_bits() looped forever on a zero numerator; return +0.0 for it and
pin both encodings with compile-time checks. Machines whose filter spans
two or more periods encode exactly as before.
Signed-off-by: Ryan Murray <[email protected]>
After READY the 15-inch M3 Air's G15G firmware installs root[1] at the shared root + 3 pages with 0x403 attributes, the G15S convention, while the G16G protocol expects root + 4 pages with 0x2000000000004cb. The host's live-root check therefore refused the backend start with EIO right after READY. Use FwAbi::V26B123G15S for the G15G build: its live root table matches what this firmware writes, and with it the queue/resource graphs, the device-control channel and DRM registration all come up on the J615. InitData, scratch window and segment layout stay G15G's own. Signed-off-by: Ryan Murray <[email protected]>
|
Row at Two new commits since
J615 one-shot of this tree (the lab trace prints are not in the pushed commits), default command line:
Host tests: asahi-m4 1/1 (T8132 and T6030 ABIs byte-identical), g15 19/19, m3 13/13. checkpatch is clean. @DjDeveloperr, two questions:
|
|
Paired row: J615 (15-inch M3 Air, 27.2 stub). PASS Kernel: linux#3163
|
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Audited full 521-line diff across all 6 files at ef1c98566309: adt::claims() cleanly scopes T8122 ownership to apple,m3-handoff-version + known layout + apple,firmware-compat 27.2.0 (leaving 14.8.3 / 26.6.2 M3 paths untouched), pagetables-l2 is strictly validated as an alias of shared-l2 (phandles[0] == phandles[4]), f32_bits(0, den) and 1-period low-peak limiter encoding (periods >= 1) are verified with compile-time assertions alongside G15G_26B123 layout_fits / power_slot_clear, and HwId::matches() keeps T8132/T6030 exact. DCO on all 4 commits, 23/23 CI green, and paired J615 gpubench + 90/90 soak + s2idle PASS verified.
|
ef1c985 (merged 75415c6) J713 (M4 Air 13", T8132, G16G B0, 26B123 fw) PASS: guarded one-shot default cmdline ( |
What
This runs the M3 MacBook Air's GPU (T8122 G15G, firmware 26B123, macOS 27.2) on the shared g16 backend that #3132 added, as data, keyed on what the device tree describes. There are no chip, board or firmware-version checks. Four commits:
591e7890, data rows: one firmware build row, the version-2 three-segment handoff layout, the G15G 26B123 InitData layout and the G15G identity. The device is selected by match data: theapple,agx-t8122row, theapple,m3-handoff-versionhandoff property and firmware-compat 27.2.0. The old m3 runtime's 14.8.3 and 26.6.2 paths are unchanged.5cdc5996, region alias: a leadingpagetables-l2region entry is accepted only as an alias ofshared-l2, meaning the same reservation. A second or unknown reservation is still refused.76e07cfb, one-period limiter: the low-peak limiter filter can span one sample period. On the J615 the ADT time constant equals the sample period, so the coefficients are +0.0 and +1.0. The limiter stays on, with every input from the ADT.f32_bits(0, n)now returns +0.0 instead of looping.ef1c9856, G15 protocol: G15G uses the G15 family's 26B123 protocol (FwAbi::V26B123G15S). The firmware installs root[1] at root + 3 pages with attributes 0x403, the G15S convention.Power and thermal come from the machine through #3132's sources. No power-budget or FastDie constants are carried over from #2781.
Tested
Apple M3 (G15G C0). gpubench passes every case it has, 11/11. The soak is 90/90 (8 VK+GL loops plus 10 fresh Vulkan clients, 0 timeouts) with 0 GPU fault or recovery lines. s2idle 1/1 after GPU use, VK and GL work after resume, 0 AVC denials. Details: drm/asahi: g16: add T8122 G15G on firmware 26B123 as data rows (stacked on #3132) #3163 (comment)Risk
Two-way (a plain revert undoes it) · T8122 GPU on firmware 27.2.0. The shared encoder changes (
f32_bitszero,periods >= 1, the region alias) leave every existing machine's encoding byte-identical: their filters span 2 or more periods and they publish no alias.Not yet
macsmc_soc_diethermal trips. Until then ZoneBackstop holds S1, as drm/asahi: enable T6030 G15S graphics on firmware 26B123 in the shared g16 backend #3132 notes for the J516s.