Skip to content

drm/asahi: report the G14 firmware-27.2 device as compute-only - #2610

Open
satchlj wants to merge 1 commit into
satchlj/g14-v27-2-kconfigfrom
satchlj/g14-v27-2-compute-only
Open

satchlj wants to merge 1 commit into
satchlj/g14-v27-2-kconfigfrom
satchlj/g14-v27-2-compute-only

Conversation

@satchlj

@satchlj satchlj commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf.

Stacked on #2545 (G14 compute on GPU firmware 27.2). One commit.

Problem. The G14 firmware-27.2 runtime refuses render commands (m3_submit), but GET_PARAMS gives userspace no way to know that. On phellos (J413 / T8112, macOS 27.2 stub), with the GPU published by aura#402, udev autoloads aurora and graphics clients take its render node. The greeter's renders fail (DRM_IOCTL_ASAHI_SUBMIT render failed: Invalid argument (2560x1664 …)), then Hyprland aborts and sddm-greeter-qt dumps core.

Change. Adds DRM_ASAHI_FEATURE_COMPUTE_ONLY (bit 41) to the uapi, reported by the G14 firmware-27.2 backend's feature_flags(). It describes the device; nothing selects by board or chip. Bits 39 and 40 are already claimed by open PRs #2059 (VM_FENCE_ERROR_COUNT) and #2523 (VDM_USC_INVALIDATE) and their Mesa counterparts. No other backend sets the bit, so kernels and devices without it behave as before. The Mesa side is aurora-silicon/mesa#585.

Tested on phellos, in two one-shot boots of the same kernel: integration/aurora 4e58401 + linux#2519, #1832, #1831, #2264, #2526 (419bb47), #2543 → #2544 → #2545, and this commit. Stage 2: aura#402.

  • Bind: "G14 firmware 27.2 running; compute-only DRM device registered", renderD128.
  • With the Mesa PR, Borealis reads the bit: the queue family drops VK_QUEUE_GRAPHICS_BIT (flags 0xf → 0xe). Vulkan compute 3 × 1024 + 300 × 4096 dispatches, every word checked: PASS on both boots (54.0 ms and 50.0 ms for the 300). dEQP-VK compute subset: 0 Fail/Crash either way (numbers on the Mesa PR).
  • Every other default check passed (panel, input, USB-PD, Wi-Fi, audio presence, AOP, camera, Bluetooth, battery).

Not fixed by this alone: the greeter still crashes. Hyprland/aquamarine take the system's only renderD node directly (aquamarine's sole-render-node fallback for split KMS/GPU platforms), and Hyprland asserts on any EGL failure there, so it never reaches the KMS-device path where Mesa can fall back to software. That needs a device-selection change in aquamarine; this PR and the Mesa PR only give userspace the bit to decide with.

Untested: any other machine (no other backend sets the bit); suspend (not exercised: see #2544).

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

@RyanTheTide

Copy link
Copy Markdown
Contributor

Looks fine. The bit is set only by the G14 27.2 backend's feature_flags() (g14_v27_2.rs:839). The render refusal it describes is already enforced in m3_submit, so the bit only tells userspace about it, and older Mesa behaves as it does today. The uapi comment says clearly that compute, VM and GEM are unaffected, which is what userspace needs to know.

The branch carries merge commits from the stack (68722a4). It will want a rebase onto integration/aurora, keeping just this commit, once #2545 is in.

Assisted-by: LLM (Claude:Opus 5.5)

@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 (68722a4 -> 0b3789c, --force-with-lease).

@satchlj
satchlj force-pushed the satchlj/g14-v27-2-kconfig branch from 3b55fec to 313361e Compare November 21, 2026 21:53
@satchlj
satchlj force-pushed the satchlj/g14-v27-2-compute-only branch from 0b3789c to c9aab7e 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: re-parented onto #2545's sign-off rewrite; this PR's commits and trees unchanged (0b3789c -> c9aab7e).

@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 c9aab7e770ce141892a81a7fcc3d3740000d033a (§1–§6): REQUEST_CHANGES (1 §4 commit-hygiene blocker + CI/§5 holds).

Code & Source Verification (0 code bugs)

  • include/uapi/drm/asahi_drm.h:541 defines DRM_ASAHI_FEATURE_COMPUTE_ONLY ((1ULL) << 41) using the same #define convention as bits 32–38 (avoiding widening enum drm_asahi_feature). Verified bit 41 is free on integration/aurora (highest bit 38) and across open PRs (#2059/#2679 use 39; #2523 uses 40).
  • drivers/gpu/drm/asahi/g14_v27_2.rs:836-840 ORs uapi::DRM_ASAHI_FEATURE_COMPUTE_ONLY as u64 into Backend::feature_flags(), which drivers/gpu/drm/asahi/file.rs:587 propagates into DRM_IOCTL_ASAHI_GET_PARAMS, matching how bits >= 32 (USERPTR, GEM_RESIDENCY, RENDER_MESH_OUTPUT) are consumed via bindgen.
  • Verified drivers/gpu/drm/asahi/m3/m3_submit.rs:268,278-282: Queue::new_g14_v27_2 unconditionally sets preempt_alloc: Some(...), and Queue::submit unconditionally rejects ParsedHardwareCommand::Render with EINVAL for it whether CONFIG_DRM_ASAHI_M3_T8122 is enabled or not.

Blockers

  1. §4 Attribution / DCO violation: Commit c9aab7e770ce141892a81a7fcc3d3740000d033a (Merge branch 'satchlj/g14-v27-2-kconfig' into satchlj/g14-v27-2-compute-only) has no Signed-off-by: trailer. Every commit in the PR must carry a human Signed-off-by:. In addition, the PR description says "One commit" while the branch carries this stray merge commit. Please rebase cleanly onto the base branch so only the single signed-off commit (af64ed5c) remains.

Additional Holds (CI & §5)

  • CI: statusCheckRollup is empty (0 checks ran on c9aab7e7 because the PR targets satchlj/g14-v27-2-kconfig, whereas host-tests.yml triggers on integration/aurora / aurora-wip). Once #2545 merges, rebase onto integration/aurora and confirm CI passes.
  • §5 Evidence: The phellos test summary reports functional checks and Borealis queue-flag verification, but does not report the §5 regression gate counts (0 SELinux denials / 0 failed units / 0 new kernel errors) on the final head.

Checklist Summary

  • §1 No model gating: Pass — backend-reported capability bit, no board/chip gating.
  • §2 Production-ready: Pass.
  • §3 Safety: Pass.
  • §4 Clean-room & attribution: Fail (missing Signed-off-by: on merge commit c9aab7e7; af64ed5c and PR body Assisted-by: are clean).
  • §5 Evidence: Incomplete (missing 0 AVC / 0 failed units / 0 new kernel errors row on rebased head).
  • §6 Naming: Pass (Borealis, aurora, aura#402).

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at 3515e7d. The branch is now the single signed-off commit on top of satchlj/g14-v27-2-kconfig, and range-diff against af64ed5 shows the patch unchanged, so the stray merge is gone. Nothing new from me. Once #2545 lands, the retarget to integration/aurora will let CI run.

Assisted-by: LLM (Claude:Opus 5.5)

@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 3515e7d7d030. The signed head exposes the capability through GET_PARAMS and keeps the flag local to the compute-only backend. The original desktop failure crosses the kernel and Mesa boundary. Please validate the final kernel and Mesa #585 together on a normal login with the flag set, then run a compute dispatch on the same boot and verify that a legacy render-capable device with the bit clear still uses hardware GL. This can land before the userspace consumer only while the loader leaves the compute-only node disabled by default.

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

Resolved Since c9aab7e770ce

  • §4 Attribution / DCO: Rebased cleanly onto satchlj/g14-v27-2-kconfig (3d8b62c36688), dropping the unsigned stray merge commit. The PR is now a single clean commit (3515e7d7d030) with human author/committer and human Signed-off-by: only.
  • Code & UAPI bit verification (0 code bugs): Re-verified include/uapi/drm/asahi_drm.h against live integration/aurora (70a00e583b03): bits 39 (DRM_ASAHI_FEATURE_ASYNC_SUBMIT) and 40 (DRM_ASAHI_FEATURE_VDM_USC_INVALIDATE) are now merged on integration/aurora, and bit 41 (DRM_ASAHI_FEATURE_COMPUTE_ONLY) remains free. Backend::feature_flags() in drivers/gpu/drm/asahi/g14_v27_2.rs sets it cleanly for the compute-only backend only. (Minor rebase note: when rebasing onto integration/aurora, update the commit message/context line since bit 39 is now ASYNC_SUBMIT and bit 40 VDM_USC_INVALIDATE is merged.)

Remaining Blockers

  1. Stacked dependency blockers (#2543, #2544, #2545) & 0 live CI checks:
    • Base branch is satchlj/g14-v27-2-kconfig (#2545), stacked on #2544 and #2543 — all three parent PRs remain open with unresolved blockers.
    • 0 CI checks have run on 3515e7d7d030. Once #2543–#2545 land, rebase and retarget onto integration/aurora (resolving the asahi_drm.h hunk context after bits 39–40) and confirm CI passes.
  2. §5 Evidence incomplete:
    • Missing §5 regression gate counts (0 SELinux denials / 0 failed units / 0 new kernel errors) on the final rebased head, plus combined validation with aurora-silicon/mesa#585 (normal login + compute dispatch on the compute-only device, and a legacy render-capable device with bit 41 clear still using hardware GL).

Checklist Summary (§1–§6)

  • §1 No model gating: Pass (capability bit reported by backend, no board/chip gating).
  • §2 Production-ready, no hacks: Pass for this PR's own diff (inherits #2544 stack blockers).
  • §3 Safety: Pass for this PR's own diff (inherits #2543 / #2544 stack blockers).
  • §4 Clean-room & attribution: Pass (3515e7d7d030 carries human author/committer and human Signed-off-by: only, 0 AI commit trailers; PR body includes Assisted-by:).
  • §5 Evidence: Incomplete (0 live CI checks; missing §5 regression gate counts and combined Mesa #585 / legacy-GL validation on final rebased head).
  • §6 Naming: Pass.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

MERGETRAIN6 source review at 3515e7d7d030. Blocking: none in this diff. Bit 41 is free in the current UAPI and the compute backend reports it through the parameters path. The signed commit is in the J473 trial. That trial's top render patch removes the compute-only flag, so the desktop result exercises the render path. For the compute-only stage, the relevant boundary is a normal desktop login and a successful compute dispatch with Mesa handling the advertised flag. Existing render-capable devices should continue to use hardware rendering.

Assisted-by: LLM (Codex)

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>
@satchlj
satchlj force-pushed the satchlj/g14-v27-2-compute-only branch from 3515e7d to 6a15a79 Compare November 24, 2026 04:33
@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 compute-only capability commit over the new Kconfig head. The header applied cleanly and COMPUTE_ONLY stays at bit 41, leaving bits 39 and 40 available to their existing claimants.

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 6a15a79e84dca1420ad94ecc07e4923da3813b3d (OPEN, non-draft, MERGEABLE, base satchlj/g14-v27-2-kconfig).

Code, UAPI Bit & Stack Interaction Verification

  • Clean diff & §4 Hygiene (PASS): Single clean commit 6a15a79e84dc directly parented on #2545 25ac88ae153c, preserving the firmware compatibility selector from #2544/#2545 and advertising DRM_ASAHI_FEATURE_COMPUTE_ONLY (bit 41) in Backend::feature_flags() (drivers/gpu/drm/asahi/g14_v27_2.rs:868-872). Human author/committer (Satya Benson <satya@benson.earth>), human Signed-off-by:, zero AI commit trailers, no merge commits, no duplicate commits. Zero code bugs in this diff.
  • asahi_drm.h bit 41 collision check against live integration/aurora (5746ef8a5afd) & open M5 #3035:
    • Live integration/aurora currently defines bits 0..=40, ending with bit 39 DRM_ASAHI_FEATURE_ASYNC_SUBMIT ((1ULL) << 39) and bit 40 DRM_ASAHI_FEATURE_VDM_USC_INVALIDATE ((1ULL) << 40).
    • Open M5 PR #3035 reserves bit 42 (DRM_ASAHI_FEATURE_COMPUTE_MULTI_CHANNEL ((1ULL) << 42)).
    • Bit 41 (DRM_ASAHI_FEATURE_COMPUTE_ONLY) is free and collision-free.
    • Rebase note: Because this stack still sits on the pre-bit-39/40 base, rebasing onto integration/aurora after #2543–#2545 land will require a trivial include/uapi/drm/asahi_drm.h context refresh placing bit 41 after bit 40 (DRM_ASAHI_FEATURE_VDM_USC_INVALIDATE) — and the commit message note about open PRs #2059/#2523 claiming bits 39–40 can optionally be updated since bits 39–40 are now merged (ASYNC_SUBMIT, VDM_USC_INVALIDATE).
  • Interaction with #3031 (full render) and aurora-silicon/mesa#585:
    • Verified on #3031 (027080fdc15b, stacked on this branch): #3031 keeps the UAPI bit 41 definition in include/uapi/drm/asahi_drm.h and cleanly drops DRM_ASAHI_FEATURE_COMPUTE_ONLY from Backend::feature_flags() (drivers/gpu/drm/asahi/g14_v27_2.rs:1203-1206) once full render is enabled (also removing "compute-only" from the probe log in c45890492123).
    • Verified on aurora-silicon/mesa#585 (055daf22b027): matches bit 41 (DRM_ASAHI_FEATURE_COMPUTE_ONLY) and gates graphics exposure via agx_compute_only(), so compute-only kernels avoid failed GL renders and seamlessly enable graphics once #3031 clears the bit.

Remaining Non-Code / Stacking Items

  1. Stacked dependencies & CI (0 checks on 6a15a79e84dc): Base branch is satchlj/g14-v27-2-kconfig, so CI has not run on this head. Once #2543–#2545 land, rebase/retarget onto integration/aurora (refreshing the asahi_drm.h hunk after bit 40) and confirm CI passes.
  2. §5 Evidence on final rebased head: Record §5 regression gate counts (0 SELinux denials / 0 failed units / 0 new kernel errors) plus paired mesa#585 verification (normal login + compute dispatch on compute-only device, and a legacy render-capable device with bit 41 clear continuing to use hardware GL).

Checklist Summary (§1–§6)

  • §1 No model gating: Pass (capability bit reported by backend; no board/chip gating).
  • §2 Production-ready, no hacks: Pass (for this PR’s own diff).
  • §3 Safety: Pass (for this PR’s own diff; inherits #2544 blocker until #2544 lands).
  • §4 Clean-room & attribution: Pass.
  • §5 Evidence: Incomplete (0 live CI checks on stacked base; final-head regression gate and paired mesa#585/legacy-GL rows pending).
  • §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