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)

@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.

@RyanTheTide RyanTheTide 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.

Independent source review at 3d8b62c36688. The cfg split now has a signed change at the head. The G14-only build uses the common submission front end and leaves the M3 render branch out. Please publish the build results for G14-only, M3-only and both enabled on this exact revision, with a legacy G14 boot and a shared M3 boot once the upstream series is ready. The parent runtime fixes in #2543 and #2544 still apply to the assembled stack.

@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.

Formal adversarial pre-PR checklist re-review (§1–§6) at 3d8b62c366887ef731b43962f1133672a85e2697.

Resolved Since 313361e8d8cf

  • §4 Attribution / DCO: Rebased cleanly onto #2544 (4c4f313592fa), dropping all three intermediate merge commits (including the unsigned 313361e8d8cf). The PR is now a single clean commit (3d8b62c36688) with human author/committer and human Signed-off-by: only.
  • Code verification: Re-verified all 13 files in the CONFIG_DRM_ASAHI_G14_V27_2 split (Kconfig, asahi_core.rs, driver.rs, event.rs, gpu.rs, hw/{mod,t8112}.rs, m3/{m3_client,m3_submit,mod}.rs, mmu.rs, object.rs, regs.rs). All four Kconfig combinations (M3_T8122 only, G14_V27_2 only, both, G15=n) are cleanly separated, and G14_V27_2-only rejects ParsedHardwareCommand::Render with EINVAL before referencing any M3 symbol.

Remaining Blockers

  1. Stacked dependency blockers (#2543 and #2544) & missing integration CI:
    • Base branch is satchlj/g14-v27-2-compute (#2544), which is stacked on #2543 (satchlj/g14-v27-2-shared). Both #2543 and #2544 are still open with active REQUEST_CHANGES blockers (§1/§2/§3 in #2544, open blockers in #2543).
    • Live CI on 3d8b62c36688 is 6/6 green (source, rust-build, kunit, DWC3/ATC 3/3), but host-tests does not trigger against a non-integration base. Rebase/retarget onto integration/aurora after #2543 and #2544 land and confirm host-tests passes.
  2. §5 Evidence incomplete on exact head 3d8b62c36688:
    • Still needed on the final rebased head: build-matrix verification for G14-only, M3-only, and both enabled (previous matrix was on earlier head 7375638a / 7fcd6e20), an M3 (T8122) hardware boot row exercising the cfg-split m3_submit, a legacy G13/G14 13.5-stub no-regression boot row, and exact-head §5 regression gate counts (0 SELinux denials / 0 failed units / 0 new kernel errors).

Checklist Summary (§1–§6)

  • §1 No model gating: Pass for this PR's own diff (inherits #2544 blockers).
  • §2 Production-ready, no hacks: Pass for this PR's own diff (inherits #2544 blockers).
  • §3 Safety: Pass for this PR's own diff (inherits #2543 / #2544 blockers).
  • §4 Clean-room & attribution: Pass (3d8b62c36688 carries human author/committer and human Signed-off-by: only, 0 AI commit trailers; PR body includes Assisted-by:).
  • §5 Evidence: Incomplete (exact-head 3-config build matrix, M3 + 13.5-stub boot rows, regression gate counts, and host-tests on integration/aurora pending).
  • §6 Naming: Pass.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

MERGETRAIN6 source review at 3d8b62c36688. Blocking: none in this diff. The G14 Kconfig option builds the shared submission carrier without selecting the M3 runtime. The signed commit is in the J473 m2pub1 trial stack.

Merge waits for the shared slot and compute runtime fixes in #2543 and #2544. The shared-build regression to record is the M3 path with its existing runtime enabled.

Assisted-by: LLM (Codex)

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 3d8b62c to 25ac88a Compare November 24, 2026 04:33
@satchlj

satchlj commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Codex GPT-6.2 Astra on @satchlj's behalf:

Replayed the single Kconfig commit over the fixed compute head. The probe conflict now uses Ryan’s firmware-compat selector and board tables under CONFIG_DRM_ASAHI_G14_V27_2.

Published heads

On each head, the Rust MMU retention harness passed the bind and teardown cache-clean checks. The batching, stamp, runtime and firmware host suites compiled with rustc and passed all 119 tests. No full kernel build or J413/J473 hardware tests were run here.

RootV27_2::controller() already consumes the calibrated fast-die release temperature and PI gains through the existing hardware-data record. PwrConfig also carries the proportional target delta, sampling period, average-power, PPM and performance parameters. The delta alone does not establish an absolute target. Machine-sourced replacements for the remaining thermal thresholds, alarm selection and per-sensor corrections await the locked aura#402 DT property contract.

RyanTheTide added a commit that referenced this pull request Nov 24, 2026
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>

@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.

Live pre-PR checklist re-review (§1–§6) at exact head 25ac88ae153c432faafdf64d5096a6f63e501f39 (OPEN, non-draft, MERGEABLE, base satchlj/g14-v27-2-compute).

Code, Kconfig Split & Hygiene Verification

  • Clean Kconfig split on top of #2544 db645f400852: Verified all 13 changed files (Kconfig, asahi_core.rs, driver.rs, event.rs, gpu.rs, hw/mod.rs, hw/t8112.rs, m3/m3_client.rs, m3/m3_submit.rs, m3/mod.rs, mmu.rs, object.rs, regs.rs). CONFIG_DRM_ASAHI_G14_V27_2 (depends on DRM_ASAHI and DRM_ASAHI_G15, default y) cleanly decouples the G14 27.2 runtime from CONFIG_DRM_ASAHI_M3_T8122 while sharing agx_*/m3_submit under any(CONFIG_DRM_ASAHI_M3_T8122, CONFIG_DRM_ASAHI_G14_V27_2) and gating driver.rs:402-409 (has_g14_handoff && compat == [27, 2, 0]) cleanly with Ryan’s firmware-compat selector and hw::t8112::REGISTERS_V27_2/WRITABLE_V27_2. Zero code issues in this diff.
  • §4 Hygiene (PASS): Single clean commit 25ac88ae153c directly parented on #2544 db645f400852 with human author/committer (Satya Benson <satya@benson.earth>), human Signed-off-by:, zero AI commit trailers, no merge commits, and no duplicate commits.
  • Live CI on 25ac88ae153c: source, rust-build, kunit, DWC3/ATC builtin-no-atc, and DWC3/ATC modular-no-atc PASS (5/6); DWC3/ATC builtin-modular-atc still IN_PROGRESS at review time.

Remaining Non-Code / Stacking Items

  1. Stacked dependencies: Waits on #2543 (152822e24034) and #2544 (db645f400852, REQUEST_CHANGES for controller() thermal/alarm literals and §5 rows) to land, then retarget onto integration/aurora and confirm full CI green (including DWC3/ATC builtin-modular-atc and host-tests).
  2. §5 Evidence on final head: Publish build matrix results for the three Kconfig combinations (G14_V27_2=y, M3_T8122=n; G14_V27_2=n, M3_T8122=y; both =y) plus a legacy G14 (13.5-stub) and shared M3 regression boot row with §5 gate counts (0 SELinux denials / 0 failed units / 0 new kernel errors).

Checklist Summary (§1–§6)

  • §1 No model gating: Pass.
  • §2 Production-ready, no hacks: Pass (for this PR’s own diff).
  • §3 Safety: Pass (for this PR’s own diff; inherits #2544 thermal blocker until #2544 lands).
  • §4 Clean-room & attribution: Pass.
  • §5 Evidence: Incomplete (5/6 CI passed with 1 in-progress; multi-config build matrix + legacy G14 / M3 regression rows pending on final rebased head).
  • §6 Naming: Pass.

Assisted-by: LLM (Gemini 4 Neon)

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