Repository navigation
drm/asahi: render on the G14 firmware-27.2 runtime - #3031
RyanTheTide wants to merge 21 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>
…h sets The 27.2 G14 compute start operation keeps the 13.5 G14 StartCompute positions for its pointers (unk_pointer +0x04, job parameters +0x0c, stats +0x14, queue +0x1c, VM slot +0x24), and its +0x28 word is at the place of 13.5's unk_28. The 13.5 path always writes 1 there (queue/compute.rs); this one wrote 0. With 0, an integer dot-product kernel and a maximum threadgroup-memory dispatch never retire, and the GPU is unusable until reboot. Write 1, as 13.5 does. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The G14 firmware 27.2 runtime refused render commands and reported the device compute-only. Render work needs a tiler and a fragment command that the firmware runs on separate engines and that share one scene. Keep the firmware root and compute bootstrap as they are. Stage both work rings before a render is published, keep its scene and VM binding until both engines retire, and let one DRM packet continue across compute and render commands. Keep the parameter-buffer bindings across render passes and answer the firmware's growth requests only after the new backing blocks are published. The render path reuses the common submission carrier and UAPI parser with the G14 queue and event layouts, so the device no longer reports itself compute-only. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Clean initial shared stamps and parameter-buffer counters before publication. Read the firmware-driven stamp after cache maintenance when observing retirement. Keep the tiler event-control index consistent between the record and the start operation, and report queue progress on timeout. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Close submission admission under the runtime mutex before unbind drains the queue. If staging a later command fails, retain the packet and its VM guard until the already-published prefix retires, then complete the fence with the staging error. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Read each SRAM operating-point voltage from the loader-provided ADT table. Refuse the handoff if the table is absent or inconsistent with the core operating points. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Firmware can release a command slot or consume a device-control entry without sending another notification. Recheck those resources on the ordered service queue when progress is blocked and bound the wait before reporting a timeout. Keep a pending growth request on the event ring until its reply is published. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The parameter manager writes the parameter-buffer page and block lists while the tiler runs, and the firmware rebuilds the page list when the buffer grows. With the lists in a read-only GPU mapping, the first render on the J473 (G14G, firmware 27.2) left a pending MMU fault: a write to a read-only page by the parameter manager, in the client context's VM slot. The firmware then waited forever for the context's cache flush after the render, so no host completion stamp was written and later work stalled. Allocate both lists from the kernel GPU read-write range, owned by the buffer, and keep one allocation of that range alive from initialization so its page tables exist before the firmware window is mirrored. The 13.5 queue keeps its per-VM placement. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Select the wire layout from the loader compatibility tuple before starting the GPU and pass the register description selected by the GPU compatible. Notify suspend when the in-flight queue empties. Pending commands stay held until resume, and unrelated wakeups exhaust the original timeout budget. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Initialization wrote only the compute engine's kick mask in the G14 firmware 27.2 hardware data. The tiler and fragment masks stayed zero, so the firmware never gave the tiler a kick slot and the first render never started on the J473. Set the tiler mask from the cluster count and the fragment mask from the active core count, as for compute. Both counts come from the GPU's ID registers. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On G14 firmware 27.2 the tiler and fragment commands left the job meta's flush_stamps word clear. The firmware's completion walk then stopped at those commands: the GPU finished them and reached the firmware stamps, but the host stamps were never written, the queues never retired, and the next job timed out. Set flush_stamps on both render commands, as the G15 firmware 27.2 path does for every command. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…odes The render admission shared with the M3 queues refuses stencil compression outright and admits compressed depth only for one sample and one layer, the layouts the M3 render path has been qualified for. The G14 firmware-27.2 queue builds its render command from the same UAPI fields, and that builder writes the depth and stencil load, store and partial compression addresses and strides in every layout. Mesa compresses depth and stencil by default, so every compositor frame of GNOME Shell (depth/stencil, one sample) and every WebRender frame of Firefox (4x MSAA, compressed depth) was rejected with ENOTSUPP on the G14 queue. Record per queue whether its render command builder carries the compression words for every sample and layer count, and admit compression by that property instead of by the M3 envelope. The M3 queues keep their current envelope. The choice follows the command builder the queue uses, not a chip or firmware version. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The G14 firmware 27.2 runtime builds its records on a GpuManager graph but drives the firmware over its own RTKit peer, so that graph's `rtkit` stays None. Its render path still allocates scenes through GpuManager::alloc(). Once the freed firmware-private objects passed the collection limit, alloc() flushed the firmware cache with a legacy device-control message, and the doorbell unwrapped the missing transport: rust_kernel: panicked at gpu.rs:1882:51: called `Option::unwrap()` on a `None` value ... GpuManager::alloc <- g14_v27_2 Backend::new_queue <- ASAHI_QUEUE_CREATE Any client that creates enough queues (piglit textureGather here) could panic the kernel. Ring every doorbell through helpers that return ENODEV when the manager has no transport. A device-control message is queued only after the transport is known, so no caller waits for an answer that never comes. alloc() now asks whether the manager has device control: without one it keeps holding freed firmware memory, because reusing it could hand the firmware stale cached lines. It warns once instead of failing every allocation. The 27.2 runtime still needs its own cache-flush request before that memory can be reused. Add KUnit tests for the collection decision. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
When a render or compute command times out on the G14 firmware 27.2 runtime, the log shows the queue stamps but not whether the GPU took a page fault. The native firmware path reads the MMU fault status at that point; this runtime had no register mapping to do the same. Map the page that holds the fault status registers when the runtime starts, choosing the registers by the GPU core as the native path does, and log the status at every timeout. A pending fault is decoded into address and unit. An empty status says the work stalled without a page fault. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
MERGETRAIN6 source review at Blocking for default enablement: the tested branch still lacks the adopted UAT teardown clean in current #2543, and the G14 thermal controller still uses fixed policy values. The runtime must use the machine-provided protection policy before enabling. The stop path also retains the firmware graph and all state even when the firmware has already stopped. Please cover rebind and reclaim after a confirmed stop, with quarantine kept for an unconfirmed stop. The J473 desktop, CTS and sleep results can qualify those exercised paths on this build. Assisted-by: LLM (Codex) |
The G14 firmware-27.2 device renders now, but its probe still logged "compute-only DRM device registered", which reads as if render commands were refused. Say that the DRM device is registered, and update the function's comment to match. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Thanks. Taking the three points in order:
Assisted-by: LLM (Claude:Opus 5.5) |
…eries The four compute follow-up commits (ownership before firmware publication, drain before completing or stopping, required SRAM voltage table, select by firmware compatibility + suspend drain) already exist in this series in render-aware form: queue staging without advancing either producer is shared by compute and render submissions (stage_work), and ownership/drain checks cover the in-flight render pair as well. Every conflict resolves to this series' version; the merged tree is identical to the series head, so the two branches no longer diverge. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal pre-PR checklist audit (§1–§6) at live head 6a3cc8250f0ea124fd7f4d81afd8ee8dfd295c29 (non-draft; base: satchlj/g14-v27-2-compute-only / #2610).
What Is Verified & Clean
- Fixes carried from
#2979/#2896: Staged tiler+fragment & compute publication with ownership recorded before cursor publication (cb9cf343),state.accepting+ lock-serializedsubmit()/stop()(f15f3d1f), required handoff SRAM voltage table removing(*mv).max(850)(4758c763),apple,firmware-compat+LegacyWithG14Handoffselection removing literalchip_id/firmware-versiongates (ec59bb6f), and safeStartCompute +0x28 = 1(471dc3cf) without#2896's thermal-alarm disarm or perf-cap lift (STATE_CAP = 100stays intact). - Shared
gpu.rspanic fix (82671c76): Removing.unwrap()onself.rtkitin doorbell/device-control paths and addingGarbageAction+ KUnit tests (asahi_gpu_garbage) is clean and prevents kernel panics on managers without an RTKit transport. - §4 Attribution & §6 Naming: Pass — all 19 commits carry human author/committer and human
Signed-off-by:only; PR body ends withAssisted-by:.
Blockers (REQUEST_CHANGES)
- §3 Safety — missing
#2543UAT teardown PoC clean (152822e240): This branch still sits on#2610->#2545->#2544-> old#2543(119cce51da), soUatShared::publish_slot()lacksclean_pocwrite-back onVmInner::drop(). Must restack onto#2543152822e240(and the updated#2544–#2610chain) and drop the duplicate#2979forward-merge (6a3cc8250f). - §3 Safety — hardcoded thermal/alarm literals inherited from
#2544:RootV27_2::controller()still writes bare literals(0x22d4, 11000),(0x2284, 900),(0x2f30, 125), andcrate::f32!(5.3)instead of sourcing protection inputs from the machine (failing closed when absent/malformed). Must be resolved in#2544(and carried here) before default enablement. - Code bug —
fail_all()skipsvm.status().record(error)forstate.rendering(drivers/gpu/drm/asahi/g14_v27_2.rs): Forstate.inflight,fail_all()records the error onf.packet.vm.status()before finishing the packet, but forstate.renderingit callsflight.packet.finish(Err(error))without callingstatus.record(error). Render timeouts/crashes therefore fail to report VM fault/reset status to userspace (DRM_ASAHI_PARAM_GROUP_VM_STATUS). - Lifecycle / reclaim on
stop()(drivers/gpu/drm/asahi/g14_v27_2.rs):stop()unconditionallycore::mem::forgetsstateandself.grapheven after a confirmed firmware stop (only unconfirmed stops should quarantine), preventing clean unbind/rebind and resource reclaim. - Minor §1 / diagnostic nits:
QueueRender::prepare()passes literal1toget_tiling_params(&to_cmdbuf(r), 1)(g14_v27_2_render.rs) instead ofself.graph.dyncfg.id.num_clusters.Runtime::sleep_prepare()timeout log printsstate.inflight.len(), which logs0 commands still runningwhen an in-flight render (state.rendering.is_some()) caused the timeout.
- CI & §5 Evidence gaps:
- CI on
6a3cc8250fis still in progress (rust-build,kunit,DWC3/ATC builtin-modular-atcincomplete) andhost-testsdoes not run until retargeted ontointegration/aurora. - J473 rows were run without
#2543152822e240; rerun on the restacked head (with bind/unbind/rebind + 0/0/0 regression gate). - No M2 Air (
J413/J415) firmware-27.2 run has been recorded yet (§1 requires proving across affected Macs with the G14G block), and J473 s2idle resets 2/2 without GFX domain retention (#2715or J473 DTapple,sleep-retained).
- CI on
Assisted-by: LLM (Gemini 4 Neon)
Two review items on the G14 firmware-27.2 runtime: - fail_all() finished the in-flight render pair without recording the error on its VM, so the client did not see the device failure the compute path reports. Record it for the render pair as for compute. - stop() kept the firmware graph and runtime state for the rest of the boot even when nothing could still reach them. Release them when the stop is confirmed: the drain retired every published command, the firmware reports itself stopped and no RTKit power-off was needed. The state lock is dropped first, so the RTKit teardown does not run under it. Any other stop keeps everything the firmware's page tables name, as before. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
MERGETRAIN6 re-review at The remaining blockers are the actual restack onto the current slot-teardown fix and machine-sourced thermal policy in #2544. Please qualify a normal unbind/rebind after confirmed stop and verify quarantine for an unconfirmed stop. The prior a2 receipt predates this lifetime change. Assisted-by: LLM (Codex) |
QueueRender::prepare() passed a literal cluster count of 1 to the tiling parameters. Use the GPU's own num_clusters, as the 13.5 render queue does. The sleep refusal message counted only compute commands; name the in-flight render pair too, since it also holds sleep off. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Thanks. Status at 027080f:
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal pre-PR checklist re-audit (§1–§6) at live head 027080fdc15b1386f204f46b01c5fb8cc36b98cc (non-draft; base: satchlj/g14-v27-2-compute-only / #2610; supersedes review #6033427540 at 6a3cc8250f).
Resolved Since 6a3cc8250f
fail_all()VM fault reporting (42964d56f523):drivers/gpu/drm/asahi/g14_v27_2.rs:591-594now callsstatus.record(error)onflight.packet.vm.status()forstate.renderingbeforeflight.packet.finish(Err(error)), matchingstate.inflight.- §1 cluster count & sleep-refusal diagnostics (
027080fdc15b):QueueRender::prepare()(g14_v27_2_render.rs:116-120) now readsdyncfg.id.num_clustersinstead of literal1, andRuntime::sleep_prepare()(g14_v27_2.rs:980-981) reports both compute commands and in-flight render pairs. - §4 Attribution & §6 Naming: Pass — all 21 commits (including
42964d56f523and027080fdc15b) carry human author/committer and humanSigned-off-by:only; PR body ends withAssisted-by:.
Remaining Blockers (REQUEST_CHANGES)
- Lifecycle / memory-reclaim bugs in
42964d56f523'sstop()path (drivers/gpu/drm/asahi/g14_v27_2.rs:388, 1054-1062&mmu.rs:4558-4563):- Rebind fails with
EBUSYand leaves stale page-table pointers:start()(line 388) still unconditionally runscore::mem::forget(window);, sommu::FirmwareWindowis neither stored inStatenor cleared on a confirmed stop. Droppingstateand releasingself.graphfrees the driver's kernel UAT tables whilettbs[0]andshared_l2still point to them andhandoff.magic_ap/magic_fwstay set toMAGIC_G14_V27_2— causing a subsequent probe to fail immediately inFirmwareWindow::reserve()(mmu.rs:4559-4562) withErr(EBUSY)(contradicting"so it is released and a later probe starts over"). StorewindowinState; on a confirmed stop after halting the ASC, clear and PoC-cleanttbs[0],shared_l2, and thehandoffmagic/lock words before droppingwindowandgraph(retainingcore::mem::forget(window)on unconfirmed stops). - Confirmed-stop predicate too loose (
g14_v27_2.rs:1055):if drained && running == Ok(0) && forced.is_none()does not requireallowed.is_ok()or that the runtime was healthy /!state.peer.is_crashed()prior to shutdown. An idle crash (g14_v27_2.rs:899) or idleprocess_eventsfailure (:905) leaves!state.running(), and iffirmware_running()readsOk(0)even whenset_idle_policy(..., true)fails,stop()frees firmware-reachable memory instead of quarantining it. Requirewas_healthy && !state.peer.is_crashed() && drained && allowed.is_ok() && running == Ok(0) && forced.is_none()(plus ASC halt confirmation).
- Rebind fails with
- §3 Safety — missing
#2543UAT teardown PoC clean (152822e240): Still stacked on#2610->#2545->#2544-> old#2543(119cce51da), soUatInner::publish_slot()(mmu.rs:2084-2090) still checks onlyself.quirks.clean_tablesrather thanself.clean_poc, and the duplicate#2979merge commit (6a3cc8250f) remains in history. Restack onto#2543152822e240(and updated#2544–#2610). - §3 Safety — hardcoded thermal/alarm literals inherited from
#2544:RootV27_2::controller()(drivers/gpu/drm/asahi/gpu/v27_2.rs:1198-1206) still writes bare literals(0x22d4, 11000),(0x2284, 900),(0x2288, 4),(0x2f30, 125), andcrate::f32!(5.3)per sensor instead of consuming machine-sourced protection values (paired withaura#402+linux#2544) and failing closed when absent/malformed. - CI & §5 Evidence:
- CI checks on
027080fdc15bare still in progress (source,rust-build,kunit,DWC3/ATCmatrix) andhost-testswill not run until retargeted ontointegration/aurora. - Prior J473 a2 run predates
42964d56f523/027080fdc15band#2543152822e240; rerun exact-head J473 (covering confirmed-stop unbind/rebind, unconfirmed-stop quarantine, and 0/0/0 regression gate) and record an M2 Air (J413/J415) firmware-27.2 run (§1).
- CI checks on
Assisted-by: LLM (Gemini 4 Neon)
|
Follow-up source review at The render VM status update and hardware-derived tiling count address those findings. Hold the rebind hardware row for the corrected ownership path. Assisted-by: LLM (Codex) |
3515e7d to
6a15a79
Compare
The release added for a confirmed stop freed the runtime state and the firmware graph while the boot handoff window, which start() keeps for the life of the boot, still references the graph's page tables. That leaves stale roots behind and can break a later bind. Keep everything the firmware could reach after any stop again, as before, and say why; releasing it needs the window torn down first. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Bring in the restacked #2610 (6a15a79: #2545 and #2544 on #2543 152822e, the TTBAT slot PoC clean in UatShared::publish_slot). The #2979 ownership fixes it also carries are already here. The rewritten #2545/#2610 commits re-add the compute-only refusals (render rejected in m3_submit, COMPUTE_ONLY feature flag); this series supports rendering, so those resolve to this series' version. Net change: the #2543 MMU teardown fix and its retention test only. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Agreed on the retained window: start() keeps the boot handoff window for the life of the boot, so freeing the graph after a stop leaves stale roots. 3cc633f goes back to keeping everything after every stop and says why in the code. Releasing it needs the window torn down first; that is a follow-up, so there is no rebind row for now. The render VM status and tiling cluster fixes stay. 365410a merges the restacked base (#2610 6a15a79, carrying #2545/#2544 on #2543 152822e). The rewritten #2545/#2610 commits re-add the compute-only refusals (render rejected in m3_submit, the COMPUTE_ONLY feature flag), which resolve to this series' version. The net change against 027080f is the #2543 MMU teardown fix and its retention test only, byte-for-byte. asahi_core.o compiles at this head with no warnings in the G14 files. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal pre-PR checklist re-audit (§1–§6) at live head 365410a463d98cda63322974c95c8bad664efc59 (non-draft; base: satchlj/g14-v27-2-compute-only / #2610 6a15a79e84dc; supersedes review #6033663928 at 027080fdc15b).
Resolved Since 027080fdc15b
- Lifecycle /
stop()window-reclaim UAF & loose reclaim predicate (3cc633f67993): Resolved by reverting42964d56f523's partialstop()release.Runtime::stop()(drivers/gpu/drm/asahi/g14_v27_2.rs:1049-1055) now unconditionally retainsstateandself.graphalongsidestart()'s retainedFirmwareWindow(g14_v27_2.rs:388), eliminating the stalettbs[0]/shared_l2page-table pointer hazard and removing the unguarded reclaim predicate.fail_all()'s render-pairvm.status().record(error)fix (g14_v27_2.rs:591-594) and027080fdc15b'snum_clusters/ sleep-refusal diagnostic fixes remain intact. (For the deferred window-teardown/rebind follow-up: pairFirmwareWindowteardown and PoC-clean ofttbs[0]/shared_l2/handoff magic/lock words withwas_healthy && !state.peer.is_crashed() && drained && allowed.is_ok() && running == Ok(0) && forced.is_none().) - §3 Safety —
#2543UAT teardown PoC clean (365410a463d9): Resolved in the live tree.365410a463d9merges restacked#2610(6a15a79e84dc) →#2545(25ac88ae153c) →#2544(db645f400852) →#2543(152822e24034), bringingUatShared::clean_pocintoUatShared::publish_slot()(drivers/gpu/drm/asahi/mmu.rs:2087-2093) and the teardown check intools/testing/selftests/drivers/gpu/asahi-m4/test-mmu-retention.py. Merge resolutions inKconfig,driver.rs,m3/m3_submit.rs, andm3/mod.rscleanly preserve the render path against6a15a79e84dc. - §4 Attribution & Commit Hygiene + §6 Naming: Pass — all 21 commits in
6a15a79e84dc..365410a463d9(including3cc633f67993and365410a463d9) carry human author/committer and humanSigned-off-by:only, with zero AI trailers in commits; PR body ends withAssisted-by:.
Remaining Blockers (REQUEST_CHANGES)
- §3 Safety — hardcoded thermal/alarm literals in
RootV27_2::controller()(drivers/gpu/drm/asahi/gpu/v27_2.rs:1198-1206): Unchanged (inherited from#2544). Still writes bare literals(0x22d4, 11000),(0x2284, 900),(0x2288, 4),(0x229c, crate::f32!(1.0).to_bits()),(0x2f30, 125),(0x2f34, 1), andcrate::f32!(5.3)per sensor instead of consuming machine-sourced protection values (paired withaura#402— still at7eb35d20e1c4— andlinux#2544) and failing closed when absent/malformed. - CI & §5 Evidence:
- CI on
365410a463d9:source,rust-build, and all 3DWC3/ATCmatrix jobs passed;kunitis still in progress, andhost-testswill not run until retargeted ontointegration/aurora. - §5 Hardware rows: The recorded J473 a2 run predates
42964d56f523–365410a463d9(including#2543152822e24034's UAT teardown PoC clean). Need an exact-head J473 run covering the 0/0/0 regression gate (0 SELinux denials, 0 failed units, 0 new kernel errors) and stop/quarantine verification (rebind deferred to the window-teardown follow-up), plus an M2 Air (J413/J415) firmware-27.2 run (§1) before merge.
- CI on
Non-Blocking Note
- Commit history (merge vs rebase): Because
365410a463d9merged6a15a79e84dcrather than rebasing onto it,6a15a79e84dc..365410a463d9still contains pre-restack duplicates of#2545/#2610(3d8b62c36688,3515e7d7d030), the#2979merge commit (6a3cc8250f0e), the reverted42964d56f523/3cc633f67993pair, and merge commit365410a463d9. The net tree diff against6a15a79e84dcis clean, so this does not block correctness, but rebasing cleanly once#2543–#2610land will avoid duplicate history.
Assisted-by: LLM (Gemini 4 Neon)
Problem
On the M2 (G14G) with GPU firmware 27.2 (the M2 Mac mini, and M2 Airs on the 27.2 stub), the firmware-27.2 runtime from #2544/#2610 runs compute only. Render commands are refused and the device reports itself compute-only, so GNOME, Firefox and every GL/Vulkan graphics client fall back to software rendering.
Change
This series adds render to the G14 firmware-27.2 runtime. It reuses the shared submission carrier, the UAPI parser, the 26.x wire helpers (#2543) and the adopted UAT from #2544. The G14 queue, event and command layouts sit in the G14 files. Behaviour is selected by the firmware compatibility the boot loader hands over and by what the GPU's ID registers report. There are no board or chip gates and no command-line or module parameters.
gpu.rsno longer unwraps a missing RTKit transport. Before, a client that created enough queues could panic the kernel fromGpuManager::alloc(). Every doorbell now returns ENODEV without a transport. Without device control, freed firmware memory is held rather than flushed (warned once). KUnit tests cover the decision.Stacked on #2610 (base
satchlj/g14-v27-2-compute-only). It supersedes our draft #2979: the drain, SRAM-table and firmware-compatibility commits here are render-aware versions of #2979's, and #2979's publication ordering is part of the render submission commit. It also carries the compute start-word commit from #2896, but not #2896's performance-state change.Testing
CONFIG_DRM_ASAHI_G14_V27_2=y. There are no warnings indrivers/gpu/drm/asahi.gpu.rsand the two new files are rustfmt-clean. checkpatch is clean.m39/9,asahi-g151/1,asahi-m41/1. The base is a feature branch, so CI does not run them here.gpu.rspanic: the J473 got past the point that panicked before (2049 queue allocations) with no panic. The KUnit cases for the collection decision pass, and a mutation of the decision is caught.apple,sleep-retainedon the GFX domain, default command line):Still to run / known limits
arb_shader_image_load_store@shader-mem-barrier(render) and Geekbench 6 Vulkan Background Blur (compute). A timeout still stops the firmware-27.2 runtime for the rest of the boot. Per-client recovery is separate work.apple,sleep-retainedonps_gfx, as arm64: dts: apple: t8112-j413-fw27: keep the GFX domain through system sleep #2614 adds for the J413 firmware-27 board. That is a separate DT PR.DRM_ASAHI_FEATURE_COMPUTE_ONLY(bit 41, drm/asahi: report the G14 firmware-27.2 device as compute-only #2610) conflicts textually with bits 39/40; keep all three.Commits, layout notes and row details
Commits (on
satchlj/g14-v27-2-compute-only3515e7d):471dc3cfG14 firmware 27.2: set the compute start word the 13.5 path sets (also in drm/asahi: G14 firmware 27.2: run every performance state, and set the compute start word the 13.5 path sets #2896, without its performance-state change)cb9cf343submit paired tiler and fragment work through G14 firmware (render path; newg14_v27_2_render.rsandg14_v27_2_abi.rs; the KUnit import fix is folded in)645c79a5synchronize G14 completion stamps for the firmware UATf15f3d1fdrain G14 submissions before completing or stopping (render-aware version of drm/asahi: fix G14 compute publication and suspend ordering #2979's)4758c763require the firmware handoff SRAM voltage table (same as drm/asahi: fix G14 compute publication and suspend ordering #2979's)c73aedd3retry G14 firmware queue backpressurec17c2705map G14 parameter-buffer lists GPU read-writeec59bb6fselect G14 by firmware compatibility and signal suspend drain (render-aware version of drm/asahi: fix G14 compute publication and suspend ordering #2979's)ea2ab585set the G14 tiler and fragment kick masksd2812fecrequest completion flushes for G14 render commandscf467644admit depth/stencil compression the G14 render builder encodes82671c76never unwrap the RTKit transport on device-control paths (sharedgpu.rs; KUnitasahi_gpu_garbage)9884f9b4report the MMU fault status on a G14 firmware 27.2 timeoutc4589049drop "compute-only" from the G14 firmware-27.2 probe messageWhat is shared and what is G14-specific:
m3_submit.rs), the 26.x wire helpers from drm/asahi: share the 26.x wire helpers and clean bound TTBAT slots #2543, the adopted UAT from drm/asahi: G14 compute on GPU firmware 27.2 #2544 and the 13.5 render structures (fw::vertex/fw::fragmentjob parameters, tiling parameters).g14_v27_2*.rs.J413 gate (production fleet kernel vs this kernel, same Mac, same command-line digest):
J473 rows (lab kernel = this G14 code + #2853/#2868/#2953):
Assisted-by: LLM (Claude:Opus 5.5)