Repository navigation
drm/asahi: enable T6030 G15S graphics on firmware 26B123 in the shared g16 backend - #3132
Conversation
Select the handoff, ADT identity, power-domain register and userspace identity from the SoC configuration. Let each handoff select its InitData layout independently of the protocol ABI, and derive the scratch alias from the mapped host block. Signed-off-by: Dj <[email protected]>
Qualify the J516s G15S 26B123 image through the shared classic backend. Share the 26B123 protocol while selecting the G15S InitData version, register map, TX geometry, host block sequence, and nine firmware DVFS rows derived from the fourteen original ADT states. Keep power sampling and low-peak limiter parameters derived strictly from the machine's live ADT rather than hardcoded overrides. Route the T6030 platform match by presence of the boot loader's handoff marker and order startup after a handed-over T6030 display, without requiring the T8132 PMP bridge or touching AXI2AF. On GPU nodes without an apple,pmp telemetry provider, keep thermal cooling active with a background SoC die thermal-zone sampler (macsmc_soc_die and apple_pmp_hotspot) feeding a fail-closed backstop that starts at S1, releases gradually after 200 ms of valid cool readings, throttles above 80 C, and clamps immediately to S1 on critical heat or missing, stale, or implausible telemetry. Run the shared firmware-halted fault scan over the valid SGX banks (selectors 0 and 1 on G15S, 0..7 on G16G) and restore the original selector even if reading one bank fails. Encode the DVFS ceiling in the shared 26B123 power fields and verify ADT-derived G15S power sampling, low-peak limiter encoding, and fail-closed thermal-zone policy in host tests. Signed-off-by: Diljit Singh <[email protected]>
Add FwAbi::V26B123G15S and per-SoC runtime parameters so T6030 G15S on
macOS 27.2 (26B123) encodes the exact wire layouts expected by the G15S
firmware without changing any T8132 G16G bytes:
- PB manager: add pb_manager::V26B123_G15S (-4 byte shift from ID_A at
+0x08 through MAX_PAGES_B at +0x7c, matching the 0x90-byte record
invalidated by TA/InitBM) and wire it through PbEpoch.
- Queue info: add qinfo::V26B123_G15S (0x88-byte header with trailing
u64 4 at +0x80 and scratch starting at +0x88).
- Render and compute work/microsequences:
- 2-cluster TPC sizing (num_clusters * e * 8 * layers) and named G15
vs G16 fragment tile-state base constants.
- G15S 74-register TA list (ta::SEL_G15S, named UMA PTC and DUPM
resource-control bitfield constructors, ta+0x760 = tpc_gva,
HEAD_ACTIVE_SIZE = 0x3e0).
- G15S 82-register FS list (fs::SEL_G15S, named UMA PTC, DUPM, cache,
ISP and ZLS register constants, G15S header words) and 0x340-byte
FS microsequence (scene+0x4c, 0x34-byte inline UMA, TS_START=0x1e4,
FINALIZE=0x280, event at +0xad, END at 0x334, and
render_attachments_for).
- G15S 25-register compute list (named G15 stage-control register, no
HAL200 USC-base register, preemption tail +0x1b80, 2-cluster
context-store offsets +0/+0x1e400/+0x3c800/+0x3d800,
HEAD_ACTIVE_SIZE = 0x180).
- Cross-engine barriers: hold FS->compute (BarrierType::Hold) on G15S
(Config::cross_engine_hold), matching G15 CROSS_ENGINE_HOLD = 1.
- UAPI and admission: gate HAL200-only FEW_PRIMITIVES, RENDER_RAY_QUERY,
and BOUNDED_AS_BUILD features/commands on gpu_generation >= 16; accept
DRM_ASAHI_RENDER_NO_VERTEX_CLUSTERING and validate 2-cluster geometry
on G15S.
- Scratch mapping and handoff: map the split G15S scratch VA spans to
the contiguous physical host-register range (+0x14000..+0x20000), and
drop the T6030 chip-ID gate in g15::Driver::probe so any G15 SoC with
apple,g16-handoff-version hands off cleanly to g16.
- Selftests: extend check-abi-26b123.rs with G15S 26B123 wire checks.
Signed-off-by: Diljit Singh <[email protected]>
…t-block before zeroing Remove hardcoded thermal-zone trip temperatures from the G16/G15S thermal-zone backstop and read passive/active/hot/critical trip limits from the kernel thermal zone via thermal_zone_for_each_trip(), failing closed at S1 whenever the machine provides no valid trip limits. Track a monotonic poller sequence counter in asahi_g16_cooling so repeated reads of a single cached temperature cannot satisfy the 10-reading startup confirmation; confirmation now requires 10 distinct fresh sensor polls. Perform a read before zeroing each host-block control register in publish_host_block() and document the G15S host-block control offsets cleanly. Signed-off-by: Dj <[email protected]>
Acquire a device reference under the registry lock and hold it until both the temperature read and trip walk finish. This pairs the reading with limits from the same registered zone even when names are reused. Require usable limits from each contributing zone in the GPU poller. A zone without usable trips invalidates the combined limits and keeps the GPU cooling backstop active. Signed-off-by: Dj <[email protected]>
Use the source state count to select candidate index mappings and validate the paired frequencies and voltages before encoding the rows. The hardware descriptor no longer needs to specify a table layout. Signed-off-by: Dj <[email protected]>
Check the post-start UAT links against the qualified table offset and attributes for each ABI. Read submit completion from the consumer cursor on rings with a producer header. Device-control rings retain their separate completion word. Accept empty shader-context scratch reservations on hardware without render scratch slots. Keep the hardware descriptor available to the running backend. Encode the parameter-buffer slot ID once on G15S so that the adjacent bank selector stays zero for nonzero slot IDs. Signed-off-by: Dj <[email protected]>
|
PASS on J773g (Apple M4, G16G B0) at Booted
Final driver stats showed 49,110 jobs, 0 recoveries, and 0 hang kills. There were 0 GPU faults and 0 new kernel errors against the production boot. The display manager was active with 0 failed units. During the production restore, ANS needed a guarded VDM reboot before the kernel handoff. Confirmed |
A GPU node may link to a PMP instance whose DT status is "disabled". That device never probes, so apple_pmp_gpu_get() keeps returning -EPROBE_DEFER and the GPU stays in deferred probe forever, reported as "(reason unknown)". Treat an unavailable apple,pmp node like an absent one and drive the fail-closed thermal-zone backstop instead. When an available PMP node has not probed yet, keep deferring, but record the reason with dev_err_probe() so it shows up in devices_deferred. Signed-off-by: Dj <[email protected]>
Resolve the conflict in drivers/gpu/drm/asahi/g15/mod.rs by keeping main's pre-activation ENODEV return from #3114 ahead of the apple,g16-handoff-version decline check. Signed-off-by: Dj <[email protected]>
|
PASS — J773g (M4, G16G B0) at
Restored |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Hardware row for J516s (16-inch MacBook Pro M3 Pro, T6030, macOS 27.2 / 26B123, G15S 18-core) at exact head
|
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at ba30b6054b6d
Blockers: The shared G16 backend needs a current J713 or J773g regression row. Please record Vulkan and GL loops, ten fresh Vulkan clients, timeouts, GPU faults and the range of performance states reached. The reported J516s target run qualifies rendering at its S1 thermal cap.
Checked: The new boot handoff selects the backend, ADT table shape selects the DVFS layout, and absent thermal trips hold the S1 ceiling. The independent host suite passed all 26 groups, including the command-stream build, G15S and G16G firmware layout oracles, and cooling and DVFS checks.
Evidence
- The current J516s target row gives 71/71 workloads, 1,271,580 jobs, zero GPU faults or recoveries and an S1 338 MHz ceiling. Please add the per-API loop and fresh-client counts from that run if captured.
- The source recheck covered PMP fallback, the temperature and trip provider, bounded DVFS encoding, backend selection and the shared command paths. Host checks include 12/12 DVFS groups, 22/22 thermal-policy units, 571,828 cooling-oracle rows and 75,414 sensor-oracle rows.
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at ba30b6054b6d
Blockers:
drivers/gpu/drm/asahi/g16/glue.c:467:asahi_g16_display_prepare()has a hardcoded T6030-versus-T8132 split for the display supplier. Every new GPU compatible takes the T8132 side. With a different available display subsystem it will miss the supplier and proceed on the boot framebuffer without waiting for native display. Resolve the supplier from a DT relationship or the existing block match data, then pass it to a shared link helper. This lets another hardware row configure the supplier without another branch in the probe. Keep the existing absent, disabled and deferred supplier tests.
Checked: The firmware layout, register encoding and GPU handoff already select through match data and the validated hardware description. Thermal sampling uses the PMP phandle or a referenced thermal zone and its trip limits. The J516s and J773g rows passed. The guarded J713, J616s and J473 checks are in progress.
Evidence
At this head the host verification passed all 26 targeted checks, including the command stream compile, the DVFS paths and the thermal-zone sampling policy. apple_drv.c already serializes publisher lifetime and device links. A supplier selected by exact DT node can reuse that synchronization.
|
|
… link Replace the hardcoded T6030-versus-T8132 split in asahi_g16_display_prepare() with match-data-driven supplier selection: - Add apple_drm_link_device(consumer, display_node) in apple_drv.c, reusing the existing display publication mutex and device-link lifetime management for any published Apple DRM display subsystem matched by exact DT node. - Add display_compatible to g16::hw::Config (t8132 and t6030 rows) and pass it from g16::boot::admit() to asahi_g16_display_prepare(), so new hardware rows configure their display supplier without adding probe branches. - Extend tools/asahi/g15-display-order-tests.py to cover a third hardware row and exact-node publication/linking mutants while keeping all existing absent, disabled, deferred, ready, and withdrawal checks. Signed-off-by: Dj <[email protected]>
|
Addressed the
Host verification on
|
|
|
RyanTheTide
left a comment
There was a problem hiding this comment.
The display link now comes from Config::display_compatible match data through the shared apple_drm_link_device(), so there's no T6030/T8132 split left, and T8122 can use the same probe path. That resolves my change request. Rows at 6945ee7: J713 (M4 Air, G16G) passes, with the display<->GPU link verified live, VK+GL 3/3, s2idle + post-wake VK/GL, and 0 faults. J316s (M1 Pro) has no regressions: GL 32/32, Borealis VK and s2idle. Earlier J713 soak at ba30b60: VK 8/8, 10/10 fresh clients, GL 8/8, perf S1-S9. Approving; it merges once the remaining checks are green.
drm/asahi: g16: add T8122 G15G on firmware 26B123 as data rows (stacked on #3132)
Run the M3 (T8122, G15G) GPU on the macOS 27.2 firmware (26B123) through the shared g16 backend, as aurora-silicon#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]>
What: Admit T6030 G15S firmware 26B123 in the shared
g16DRM backend by parameterizing boot admission, UAT root validation, submit ring cursors, parameter-buffer manager layout, two-cluster descriptors, ADT-driven DVFS layout selection, machine-trip thermal limits, and disabled-apple,pmpcooling fallback without duplicating the backend.Tested: J516s (M3 Pro, T6030) at
36f28ca9(combined bare-metal candidate3b68024a1faacontaining36f28ca9unchanged, default cmdline):aurora-g16probes at 4.52s with 0 deferrals,/dev/dri/card0+renderD128,vulkaninfoApple M3 Pro (G15S B1)(Borealis) + GLES 3.2 + KDE Wayland, 54/54gpubenchok, 0 GPU faults, 0 recoveries, 0 hang kills, 0 DART faults, 0 failed units. M4 mini (J773g, G16G B0, 26B123) passed ata54d9f2d(49,110 jobs, 0 faults;36f28ca9re-check requested). Host suite: 26/26asahi-m4tests pass (0 skips), T8132 G16G ABI binaries (1,969,404 B) byte-for-byte unchanged, strict checkpatch 0/0/0.Risk: two-way door · M3 Pro (
T6030G15S) and M4 (T8132G16G, sharedg16/backend)Not yet: J516s DT thermal-zone trips (follow-up PR: without trips on
macsmc_soc_die,ZoneBackstopintentionally fails closed atS1338 MHz on J516s) and M4 mini (J773g) re-check at36f28ca9.Details
26B123(b000) through the shareddrivers/gpu/drm/asahi/g16/backend.26B123wire layouts via hardware/firmware descriptors (PB_MGR,QINFO,FS, 2-cluster geometry/TA/FS/compute,TxLayout::RingHeadersubmit cursor, UAT post-init root validation, SCS reservation capability) while keeping T8132 G16G (V25G83andV26B123) byte-for-byte unchanged.thermal_zone_devicereference across temperature sampling and trip walking (failing closed toS1if any contributing zone lacks trips), selects 14- vs 16-state DVFS layout from the ADT table shape, reads host-block registers before zeroing, treats a disabledapple,pmpDT node as absent instead of deferring forever, and records realapple_pmp_gpu_get()errors viadev_err_probe().Evidence
36f28ca991c18ead2f999ce3e38696026672da673b68024a1faa5a696d77fb6f91e9f85cf440d0e9(Linux 7.3.0, Aura Stage 2683a128b, default cmdline) containing36f28ca9unchanged:aurora-g16probed cleanly at 4.52s (0 deferrals);M4 cooling: sample_ns=Some(4870022665) mc=36461 sensor=None governor=0 power=0 backstop=8 limit=S1(fail-closed backstop active because J516smacsmc_soc_diehas 0 DT trips)./dev/dri/card0+renderD128up;vulkaninfoenumeratesApple M3 Pro (G15S B1)(Borealis); GLES 3.2 +plasmalogin/kwin_waylandhardware-accelerated.gpubenchsuite (13 tests, 54/54 rows ok): 0 GPU faults, 0 recoveries, 0 hang kills, 0 DART faults, 0 failed systemd units.J773g,G16G B0,26B123) row ata54d9f2d: PASS (49,110 jobs,gpubench-vk4/4, Vulkan CTS 91/0/2 NS, 0 faults/recoveries). Re-check requested at36f28ca9(additiveof_device_is_available()+dev_err_probe()inglue.c).36f28ca9: 26/26asahi-m4host tests PASS (0 skips), 7 T8132 G16G ABI binaries (1,969,404 bytes) + 640 PB records identical to parent, strict checkpatch 0/0/0.