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)

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-kconfig branch from 313361e to 3d8b62c Compare November 22, 2026 10:43
@satchlj
satchlj force-pushed the satchlj/g14-v27-2-compute-only branch from c9aab7e to 3515e7d Compare November 22, 2026 10:43
@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)

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