Skip to content

drm/asahi: build the G14 firmware-27.2 path without the M3 runtime - #2545

Open
satchlj wants to merge 1 commit into
satchlj/g14-v27-2-computefrom
satchlj/g14-v27-2-kconfig
Open

satchlj wants to merge 1 commit into
satchlj/g14-v27-2-computefrom
satchlj/g14-v27-2-kconfig

Conversation

@satchlj

@satchlj satchlj commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf.

Third of three PRs that replace #2473. It builds on #2544 (and #2543).

The G14 firmware-27.2 runtime reuses the 26.x submission front end (m3_submit, agx_uapi and their helpers), so #2544 builds it only with CONFIG_DRM_ASAHI_M3_T8122. This PR gives it its own option and builds the shared front end for either user.

What changes

  • Kconfig: DRM_ASAHI_G14_V27_2 ("Apple M2 (G14G) on GPU firmware 27.2, compute only"), default y. Like the M3 runtime, it depends on DRM_ASAHI_G15, because the firmware's UAT is adopted through that backend's handoff helpers (Uat::new_adopted, the G15 UAT table cleaning).
  • 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 code is gated on the new option instead of G15 && M3_T8122.

Tested

  • Builds against the packaged phellos kernel (7.3.0-1-up1-ARCH) in four configurations, with no new warnings from this series: G14_V27_2 + M3 runtime; G14_V27_2 without the M3 runtime; M3 runtime without G14_V27_2; and G15 off (both off).

  • On phellos (J413, firmware 27.2), the module built without DRM_ASAHI_M3_T8122 and loaded with no parameters, under the same watchdog arrangement as drm/asahi: G14 compute on GPU firmware 27.2 #2544: trial c4, this head: PASS, 303 of 303 dispatches, 0 bad words; normal stop; clean rmmod; return to the default. Trial c2, an earlier version of this PR differing only in cfg attributes on helpers: the same. Each trial: Vulkan compute, 303 dispatches, every word checked, normal stop, clean rmmod, unattended return.

  • Head 7fcd6e20 (merges the review commits of drm/asahi: share the 26.x wire helpers and clean bound TTBAT slots #2543 and drm/asahi: G14 compute on GPU firmware 27.2 #2544; no change to this PR's own files): module built against phellos's up2 default kernel and run there, trial d8: PASS, 303 of 303 dispatches, every word checked, clean stop and rmmod. Details in drm/asahi: G14 compute on GPU firmware 27.2 #2544. Also built with DRM_ASAHI_G14_V27_2 and without DRM_ASAHI_M3_T8122, with no new warnings.

Untested

  • The M3 (T8122) runtime on hardware with its parts of m3_submit behind cfg. They compile unchanged in M3 builds, but no M3 machine booted this.
  • Dropping the DRM_ASAHI_G15 dependency. That would move the adopted-UAT helpers out of the G15 backend and is not part of this series.

Assisted-by: LLM (Anthropic:Claude Opus 5.5)

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf: hardware run.

PR head Checked Result
7375638a Stacked series in the default kernel (CONFIG_DRM_ASAHI_G14_V27_2=y). Default loader leaves the GPU disabled; one-shot with a trial loader that publishes it: insmod with no parameters, Vulkan compute 3 × 1024 + 300 × 4096 words, every word checked on the CPU, "GPU stopped: … submitted=303 completed=303", rmmod clean. Render not tested Pass, 303/303

Build: phellos (MacBook Air M2, J413, macOS 27.2 / 26B123 stub), default rebuilt 2026-11-20 = linux integration/aurora 458f759 + #2519 #1832 #1831 #2264 #2525 #2526 #2543 #2544 #2545; Aura main 0beafec9 + aurora-silicon/aura#377 aurora-silicon/aura#227 (isp.c only) aurora-silicon/aura#381 aurora-silicon/aura#382; U-Boot aurora-wip 37baf8f7 + aurora-silicon/u-boot#67; Stage 2 DTB t8112-j413-fw27.dtb. One-shot boot under the SoC watchdog, then made the default (two default boots healthy).

@RyanTheTide

Copy link
Copy Markdown
Contributor

Build and host-test row from our lab (no 27.2 hardware run: our J413 is still on the 13.5 stub).

Head Check Result
7375638a Full arm64 LLVM=1 build, Image modules dtbs, with our shipped fleet config (G15, G16 and M3_T8122 on; olddefconfig adds only DRM_ASAHI_G14_V27_2=y) OK. 17 Rust warnings in the asahi crate, all dead code in G17/M5, mmu/ and pgtable.rs; none on lines this stack adds
7375638a asahi-m4 run-host-tests.py 23/23 (base 458f759d: 23/23)
6eb9dc55 (#2543) tools/asahi/m3-runtime-tests.rs 83/83 (base: 81/81)

The probe dispatch only takes the 27.2 path for (G14, G) with apple,firmware-version = 27.2.0, so other GPUs and G14 on 13.5 keep the existing probe. The stack does touch shared files (gpu.rs, mmu.rs, event.rs, object.rs, regs.rs, g15/uat.rs, g17/). So a boot row on a G14/G13 machine on the 13.5 stub is the remaining check for the "other firmware versions keep the existing code" claim. We can run it on our J413 and M1 Pro once the stack is ready to merge.

Review of the shared part, read against the Airs on 27.2: #2543 (comment)

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf.

Merged #2544's new head f890a9c (the pool-slot cursor fix) as 6c5d3db. Nothing in this PR's own change is different. Cause, bisect and trials are in #2544 (comment). On phellos, with the module built from this head, h1–h8 passed 8/8 (3 × 1024 + 300 × 4096, 303/303), and the host tests passed 23/23.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 1.

  1. The non-merge commit ("drm/asahi: build the G14 firmware-27.2 path without the M3 runtime") has no Signed-off-by and carries Co-Authored-By: Claude Opus 5.5. It needs the author's Signed-off-by and no agent trailer. The PR body should end with Assisted-by: LLM (Claude:Opus 5.5) instead of the "Generated with Claude Code" footer. Please also rebase rather than carry the three "Merge branch 'satchlj/g14-v27-2-compute'" commits, so the series bisects as the three PRs.

The cfg split itself checks out. Sink, run, timed_out and cancel (m3/m3_submit.rs:63-69, :158-235) cover every variant in each of the three configurations. A G14-only build refuses render before touching any M3 symbol (m3_submit.rs:277-279). The FirmwareWindow/MAGIC_G14_V27_2 gate in mmu.rs:4520-4537 narrowing from G15 to the new option matches its only user. task_comm() moved without changes.

Assisted-by: LLM (Claude:Opus 5.5)

@satchlj
satchlj force-pushed the satchlj/g14-v27-2-compute branch from 0aac788 to 81446c7 Compare November 21, 2026 21:12
@satchlj
satchlj force-pushed the satchlj/g14-v27-2-kconfig branch from a8d3cd3 to 3b55fec Compare November 21, 2026 21:12
@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf: trailer-only rewrite, removed Co-Authored-By from 1 commit(s); same trees, Signed-off-by kept (a8d3cd3 -> 3b55fec, --force-with-lease).

@satchlj
satchlj force-pushed the satchlj/g14-v27-2-compute branch from 81446c7 to f5dfd26 Compare November 21, 2026 21:53
@satchlj
satchlj force-pushed the satchlj/g14-v27-2-kconfig branch from 3b55fec to 313361e Compare November 21, 2026 21:53
@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf: added the missing Signed-off-by: Satya Benson to 1 commit(s); same trees, nothing else changed (3b55fec -> 313361e, --force-with-lease).

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-PR checklist review at head 313361e8d8cf (stacked on #2544 and #2543).

Code & Kconfig Split

The CONFIG_DRM_ASAHI_G14_V27_2 split itself is clean: Sink, Job::{run,timed_out,cancel}, Queue::{new,new_g14_v27_2,submit}, m3/mod.rs, mmu.rs (FirmwareWindow/MAGIC_G14_V27_2), and task_comm() relocation handle all three enabled combinations (M3_T8122 only, G14_V27_2 only, both) and G15=n cleanly, and a G14_V27_2-only build refuses render commands with EINVAL before touching M3 symbols.

Blockers

  1. §4 Attribution / DCO — unsigned code-change commit (313361e8d8cf).
    Commit 313361e8d8cf (Merge branch 'satchlj/g14-v27-2-compute' into satchlj/g14-v27-2-kconfig) is not a trivial merge: it introduces the new #[cfg(CONFIG_DRM_ASAHI_G14_V27_2)] gate changes on sleep_prepare and sleep_complete in drivers/gpu/drm/asahi/driver.rs, but carries no Signed-off-by: line. Per §4, every commit carrying authored changes must have a human Signed-off-by:.
    • Fix: rebase this PR cleanly onto #2544's updated head so the three intermediate merge commits (71d18e84, 7d84e08c, 313361e8) are dropped and the complete cfg split lives in a single cleanly bisectable, signed commit.
  2. Stacked dependency blockers (#2543 and #2544).
    This PR depends on #2543 and #2544, both of which have open REQUEST_CHANGES blockers that must be resolved before this branch can rebase and merge.

Pre-PR Checklist (§1–§6)

  • §1 No model gating: Pass (for this PR's own diff; inherits #2544).
  • §2 Production-ready, no hacks: Pass (for this PR's own diff; inherits #2544).
  • §3 Safety: Pass (for this PR's own diff; inherits #2543/#2544).
  • §4 Clean-room & attribution: Blocked on 313361e8d8cf missing Signed-off-by: (Blocker #1). Non-merge commit b45a912c has human author/committer and Signed-off-by: only, and the PR body discloses agent assistance.
  • §5 Evidence: Partial. CI checks (source, rust-build, kunit, DWC3/ATC matrix) are green. Still needed on the final rebased head: J413 regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors), an M3 (T8122) hardware boot row with the cfg-split m3_submit, and a G13/G14 13.5-stub no-regression row.
  • §6 Naming: Pass.

Assisted-by: LLM (Gemini 4 Neon)

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>
@satchlj
satchlj force-pushed the satchlj/g14-v27-2-kconfig branch from 313361e to 3d8b62c Compare November 22, 2026 10:43
@satchlj
satchlj force-pushed the satchlj/g14-v27-2-compute branch from f5dfd26 to 4c4f313 Compare November 22, 2026 10:43
@RyanTheTide

Copy link
Copy Markdown
Contributor

J473 (M2 Mac mini, G14G) hardware row, macOS 27.2 stub (26B123). The watchdog-backed one-shot used the packaged kernel built at 7375638a from this series and a Stage 2 trial containing the G14G handoff from aurora-silicon/aura#402. The kernel booted with the fleet command line.

  • The loader published the GPU node with firmware 27.2.0. The driver reported a running G14 compute runtime and provided a render node.
  • Borealis with dEQP-VK 1.4.7.1 passed all 11 compute.pipeline.builtin_var cases in each of three runs, 33/33 total.
  • The triangle render smoke test returned VK_ERROR_DEVICE_LOST with kernel submission EINVAL, consistent with the compute-only runtime.
  • SELinux stayed Enforcing with 0 AVCs. The row covers the packaged revision above.

The one-shot test files were removed and the machine returned to the distro default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants