Skip to content

drm/asahi: g17: enable render stage prefixes on T6041 (25G83) - #2862

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:feat/t6041-render-stage-prefixes
Nov 23, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:feat/t6041-render-stage-prefixes

Conversation

@AxxzyWasTaken

@AxxzyWasTaken AxxzyWasTaken commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On T6041 (M4 Max), BUILD_25G83 inherits render_stage_prefixes: false from fw::variant::V25G83. Because of that, any render submitted with DRM_ASAHI_RENDER_STAGE_PREFIXES is rejected and userspace (DRM_ASAHI_FEATURE_RENDER_STAGE_PREFIXES_V2) cannot split tiling vs. fragment dependencies: a render whose vertex/tiling work depends on a narrower prefix of earlier render and compute work than its fragment work has to wait as a whole for that compute work.

Change

Enable render_stage_prefixes: true on T6041's BUILD_25G83 variant in drivers/gpu/drm/asahi/hw/t6041.rs, exposing DRM_ASAHI_FEATURE_RENDER_STAGE_PREFIXES_V2 to userspace.

On non-M5 builds (!variant.m5_commands), stage-prefix splitting is handled entirely in the host device-mutex submission path with no new firmware descriptor fields or firmware ABI changes (A18 Pro on V26A428, also !m5_commands, already runs this exact path with render_stage_prefixes: true):

  • g17/runtime/render/direct.rs keeps staged renders off the direct publication path.
  • g17/runtime/render/submit.rs resolves the narrower tiling prefixes and whole fragment prefixes.
  • g17/queue/render.rs emits standard KickDependency words into the kick barrier arrays with dependency_types set to None.

Scope boundaries:

  • Both 32-core and 40-core T6041 configurations share BUILD_25G83.
  • T6040 (M4 Pro), T6041 26B123, and T6041 25F84 keep render_stage_prefixes: false unchanged.

Testing

  • scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks (9 lines checked).
  • make ARCH=arm64 LLVM=1 drivers/gpu/drm/asahi/aurora.o: compiles cleanly with 0 warnings in drivers/gpu/drm/asahi/hw/t6041.rs (clang 22.1.8, rustc 1.99.1).
  • CI (host-tests): green.
  • J616C (32-core T6041, 25G83) hardware verification at exact head d9c2c299096c (7.3.0-j616c-pr2862, see #issuecomment-7093785837):
    • DRM_ASAHI_FEATURE_RENDER_STAGE_PREFIXES_V2 (bit 33) verified live (features=0x0000007a6001dc07, chip_id=0x6041).
    • Paired live aurora-silicon/mesa#792 (593c70a6) overlay: g17p-vulkan-cross-queue PASS (0/300 mismatches, 1,799 live AGX3 staged-render hits); 88,456 Vulkan CTS cases (57,583 Pass / 30,873 NS / 0 Fail / 0 Warn, 0 EINVAL, 0 device lost).
    • 0 GPU faults/errors/warnings, 0 failed systemd units, 0 SELinux AVC denials.

Uncovered Hardware

  • Not hardware-tested here: 40-core T6041 (J614C/J575C, shares BUILD_25G83). T6041 26B123, T6041 25F84, and T6040 (M4 Pro) are left on render_stage_prefixes: false.
Reviewer detail
  • Base: integration/aurora f5fae3cbb047.
  • Diff touches only drivers/gpu/drm/asahi/hw/t6041.rs (+3 lines on BUILD_25G83).
  • V25G83 base default in g17/fw/variant.rs remains render_stage_prefixes: false, so T6040 is unaffected.

Assisted-by: LLM (Anthropic:Claude Opus 5.5, Google:Gemini 4 Neon)

A render whose vertex work depends on a narrower prefix of earlier
render and compute work than its fragment work currently waits as a
whole for that compute work on T6041, because
DRM_ASAHI_RENDER_STAGE_PREFIXES is rejected when
variant.render_stage_prefixes is false.

On non-M5 builds (!variant.m5_commands), stage-prefix splitting is
handled entirely in the host device-mutex submission path:
g17/runtime/render/direct.rs keeps staged renders off the direct path,
g17/runtime/render/submit.rs resolves the narrower tiling prefixes and
whole fragment prefixes, and g17/queue/render.rs emits standard
KickDependency words into the kick barrier arrays with dependency_types
set to None. A18 Pro (V26A428, also !m5_commands) already runs this
exact path with render_stage_prefixes enabled. There are no new
firmware descriptor fields or firmware ABI changes.

Enable render_stage_prefixes on T6041's 25G83 firmware variant (both
32-core and 40-core configurations share BUILD_25G83), exposing
DRM_ASAHI_FEATURE_RENDER_STAGE_PREFIXES_V2. T6040 (M4 Pro), T6041
26B123, and T6041 25F84 are left unchanged.

Test scope: compile-tested here; runtime verification on J616C (32-core
T6041, 25G83) with staged-render Vulkan/Mesa workloads is pending, and
40-core configurations (J614C/J575C) have not been hardware-tested.

Signed-off-by: AxxzyWasTaken <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Review at d9c2c29 (non-author, draft). No blocker in the code; it waits on the J616C staged-render row.

  • render_stage_prefixes only selects the host path: !m5_commands builds split prefixes in g17/runtime/render/submit.rs and keep staged renders off direct publication, the same path the A18 Pro (V26A428) already runs. The flag is per firmware build in hw/t6041.rs, so T6040 and the other T6041 builds keep false.
  • Merges cleanly on the current integration/aurora tip.

Point to consider: if the split has no firmware dependency (standard KickDependency words, dependency_types None), the per-build flag is only there because the path is unproven on each machine. Once the T6041 row is in, a row on the M4 Pro (T6040, same V25G83 base) would let the flag be dropped for !m5_commands entirely instead of growing a per-chip list. Happy to help with a T6040 row.

Assisted-by: LLM (Claude:Opus 5.5)

@AxxzyWasTaken

Copy link
Copy Markdown
Contributor Author

J616C (MacBook Pro 16" M4 Max, T6041, 32-core 25G83) exact-head hardware verification at d9c2c299096c (7.3.0-j616c-pr2862, aura v1.0.0b15):

  • UAPI feature advertisement (DRM_IOCTL_ASAHI_GET_PARAMS on /dev/dri/renderD128):
    • chip_id=0x6041, gpu_gen=16, features=0x0000007a6001dc07 → DRM_ASAHI_FEATURE_RENDER_STAGE_PREFIXES_V2 (bit 33) = 1.
  • Baseline Mesa (git-1fa0b69be2, Borealis Vulkan 1.4):
    • vulkaninfo --summary PASS, glmark2-es2-drm --off-screen PASS (build 3738 FPS, terrain 323 FPS, Score 2029), vtxalu 1M×40f 16.304 ms (61.34 fps), dEQP-VK raster/geometry/tiling subset (624 cases): 258 Pass / 366 NS / 0 Fail / 0 Warn.
  • Live end-to-end V2 staged render execution (aurora-silicon/mesa#792 @ 593c70a63c40 overlay on this kernel):
    • g17p-vulkan-cross-queue (8 scenarios × 300 frames): PASS (0/300 mismatches across all uncompressed/compressed/transfer/empty-submit cases, 1,799 live AGX3 staged render hits under ASAHI_MESA_DEBUG=perf).
    • dEQP-VK.synchronization.op.*: 11,376 Pass / 8,755 NS / 0 Fail / 0 Warn (20,131).
    • dEQP-VK.synchronization2.op.*: 19,141 Pass / 19,709 NS / 0 Fail / 0 Warn (38,850).
    • dEQP-VK.draw.*: 27,066 Pass / 2,409 NS / 0 Fail / 0 Warn (29,475).
    • Total: 88,456 CTS cases (57,583 Pass / 30,873 NS / 0 Fail / 0 Warn), 0 EINVAL, 0 device lost.
  • Health: 0 failed systemd units, 0 SELinux AVC denials, 0 GPU faults/errors across all runs.

Moving out of Draft — ready for review.

Assisted-by: LLM (Google:Gemini 4 Neon)

@AxxzyWasTaken
AxxzyWasTaken marked this pull request as ready for review November 23, 2026 06:54

@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 §1–§6 pre-PR checklist review at live head d9c2c299096c0aa2059b3c399d7637615bd58f77 (CI green: host-tests).

Technical Audit

  • drivers/gpu/drm/asahi/hw/t6041.rs (+3/-0): Sets render_stage_prefixes: true on BUILD_25G83, exposing DRM_ASAHI_FEATURE_RENDER_STAGE_PREFIXES_V2 (g17/mod.rs:2529) and enabling DRM_ASAHI_RENDER_STAGE_PREFIXES (g17/command.rs:597).
  • Cross-checked g17/runtime/render/direct.rs:291-292, g17/runtime/render/submit.rs:633-655, and g17/queue/render.rs:731-782: for !variant.m5_commands, stage-prefix splitting stays on the host device-mutex submission path and emits standard KickDependency words (dependency_types: None), the exact path already proven on A18 Pro (V26A428) with no firmware ABI changes.
  • V25G83 base default (g17/fw/variant.rs:189) remains false, leaving T6040 (M4 Pro), T6041 26B123, and T6041 25F84 unchanged.

Checklist Summary

  • §1 No model gating: Pass (uses the existing per-firmware-build fw::variant::Variant qualification flag; J616C 32-core T6041 25G83 is a sound same-SoC stand-in for 40-core T6041 sharing BUILD_25G83 on this host-only path).
  • §2 Production-ready: Pass (default cmdline, no parameters or hacks).
  • §3 Safety: Pass (no hardware/power/thermal limits touched).
  • §4 Clean-room & attribution: Pass. Commit d9c2c299096c carries human author/committer (AxxzyWasTaken) and Signed-off-by:, zero AI trailers in commit; PR body ends with Assisted-by:.
  • §5 Evidence: Pass. CI host-tests green + make ARCH=arm64 LLVM=1 drivers/gpu/drm/asahi/aurora.o (0 warnings) + checkpatch.pl --strict clean. Exact-head J616C (7.3.0-j616c-pr2862, d9c2c299096c) verification proves DRM_ASAHI_FEATURE_RENDER_STAGE_PREFIXES_V2 (bit 33 = 1), 1,799 live staged render hits across g17p-vulkan-cross-queue (0/300 mismatches), 88,456 dEQP-VK sync/sync2/draw CTS cases (57,583 Pass / 30,873 NS / 0 Fail / 0 Warn, 0 EINVAL, 0 device lost), and full §5 health (0 failed units, 0 SELinux AVC denials, 0 GPU faults/errors).
  • §6 Naming: Pass (Borealis used in testing report; existing drm/asahi path unchanged).

Approved for MERGETRAIN-LINUX4. (Non-blocking notes: the PR body still has the pre-hardware-row Draft text superseded by the 06:54Z J616C comment; as Ryan noted, once T6040 is measured, dropping the per-build flag for !m5_commands altogether is a clean follow-up.)

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide merged commit 6d3d3cd into aurora-silicon:integration/aurora Nov 23, 2026
1 check passed
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