Skip to content

drm/asahi: advertise vertex scratch on scheduled render queues - #3714

Merged
RyanTheTide merged 2 commits into
mainfrom
feat/scheduled-vertex-scratch
Dec 1, 2026
Merged

RyanTheTide merged 2 commits into
mainfrom
feat/scheduled-vertex-scratch

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What: Advertise helper-backed vertex scratch on scheduled AGX2 render queues. Linux #3455 added admission and firmware programming. Userspace needs a way to distinguish those queues from earlier kernels that reject the same render.

Tested: At 77b1d51184a6, cross-built the arm64 aurora.ko on a warm x86-64 build tree with CONFIG_DRM_ASAHI_G14_V27_2=y. The J313 (M1 Air) hardware row is pending.

Risk: One-way door for the UAPI bit assignment. It describes existing M1/M2 scheduled queue behavior. Older Mesa ignores the bit.

Not yet: The paired kernel/Mesa J313 run. The companion Mesa regression row passed on stock J773g (98,776 identical case results). On the older J313 daily kernel, the companion Mesa change eliminated the reported render rejections, but the four-worker robustness group still timed out.

Evidence

Base d71f3b2101e1. After refreshing the warm Rust UAPI dependencies, built with M=drivers/gpu/drm/asahi. The generated Rust UAPI constant was 2251799813685248 (1ULL << 51). The module linked and passed modpost. The shared kernel/Mesa assignment is bit 51; bits 48–50 are reserved by the pending submit, G16 and fence-error features. The original AGX2 render interface already accepts vertex scratch.

On daily kernel c78766a6b703, the same robustness group timed out on both Mesa base 8b59f2b0 and Mesa head a80347544787. Base had 151 scratch rejections. Head had zero rejected renders before its first firmware timeout. Four workers were active, and the recorded case count does not identify the stopped render.

A scheduled AGX2 queue gained vertex scratch admission and the matching firmware field in 57d2e88. Tell userspace it can run a spilling vertex shader on this queue. The older AGX2 queue interface already supports vertex scratch.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 30, 2026 22:33
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) blast:m2 Macs affected, from Merge risk (bot) door:one-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at 77b1d511: not ready yet

Check Detail
CI at head no failing: KUnit spi-hid-apple, KUnit spi-hid-apple, KUnit avd, KUnit avd, KUnit ave, KUnit ave
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 77b1d511
Conflicts ok not computed yet
PR text ok Risk: one-way · for the UAPI bit assignment. It describes existing M1/M2 scheduled queue behavior. Older Mesa ignores the bit.

Areas: area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: HOLD at 27320e21

Blockers:

  • Queued hosted CI at 27320e21 (2P/0F/18Q): Wait for apple-build, host-tests, pr-text, and KUnit suites to complete green at 27320e21.
  • Exact-head hardware rows missing (noted in PR body Not yet:): Because DRM_ASAHI_FEATURE_SCHEDULED_VERTEX_SCRATCH (1ULL << 49) is a one-way-door UAPI capability bit, please post the paired kernel/Mesa J313 (M1 Air) exact-head 27320e21 verification row (confirming the bit is advertised via GET_PARAM and vertex scratch renders cleanly without rejections) plus the M4 mini stock-kernel Mesa regression check.

Checked:

  • Audited full +9/-0 diff (drivers/gpu/drm/asahi/g14_v27_2.rs, include/uapi/drm/asahi_drm.h):
    • Cleanly defines DRM_ASAHI_FEATURE_SCHEDULED_VERTEX_SCRATCH as ((1ULL) << 49) with clear ABI documentation (explaining AGX2 non-scheduled queues already accept vertex scratch) and advertises it in g14_v27_2::Backend::feature_flags().
    • Confirmed bit 49 does not collide with any existing bit in include/uapi/drm/asahi_drm.h (including bit 48).
Evidence
  • Head commit: 27320e21078b5fb0ab45f40b8dd6697f485589cd (MERGEABLE into main).
  • CI snapshot: 2P/0F/18Q.

Keep scheduled vertex scratch distinct from the feature bits assigned to linux#3685 and linux#2059.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: HOLD at 77b1d51184a6

Blockers:

  • Queued hosted CI at 77b1d51184a6 (2 passed, 18 queued) — wait for apple-build, host-tests, pr-text, and KUnit suites to complete green.
  • Missing exact-head 77b1d51184a6 hardware verification rows (still listed under Not yet:): paired kernel + mesa#1437 verification on an M1/M2 scheduled-queue Mac (J313) confirming bit 51 is advertised and vertex scratch runs cleanly, plus a second-family regression row (e.g. M4 mini stock/regression check confirming bit 51 stays clear on non-AGX2 backends).

Checked:

  • Audited commit 77b1d51184a6 (drm/asahi: use bit 51 for scheduled vertex scratch): moves DRM_ASAHI_FEATURE_SCHEDULED_VERTEX_SCRATCH to (1ULL) << 51 in include/uapi/drm/asahi_drm.h, avoiding bits 48–50 and matching companion aurora-silicon/mesa#1437 (4aee2c9ce9f3).
  • Confirmed drivers/gpu/drm/asahi/g14_v27_2.rs remains unchanged in logic (feature_flags() advertises DRM_ASAHI_FEATURE_SCHEDULED_VERTEX_SCRATCH only on the G14 v27.2 scheduled backend).
Evidence
  • Head: 77b1d51184a68270aeacecb709730f0b4ec10e1e (base main, MERGEABLE, 2 commits: 27320e21078b, 77b1d51184a6).
  • Verified #define DRM_ASAHI_FEATURE_* bit allocation in include/uapi/drm/asahi_drm.h: bits 32–47 assigned, bit 51 unused and collision-free.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 77b1d51184a6

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: - Audited commit 77b1d51184a6 (drm/asahi: use bit 51 for scheduled vertex scratch): moves DRM_ASAHI_FEATURE_SCHEDULED_VERTEX_SCRATCH to (1ULL) << 51 in include/uapi/drm/asahi_drm.h, avoiding bits 48–50 and matching companion aurora-silicon/mesa#1437 (4aee2c9ce9f3).

  • Confirmed drivers/gpu/drm/asahi/g14_v27_2.rs remains unchanged in logic (feature_flags() advertises DRM_ASAHI_FEATURE_SCHEDULED_VERTEX_SCRATCH only on the G14 v27.2 scheduled backend).

Follow-ups (not blocking): queued CI; J313 kernel + mesa#1437 row (2nd family not required)

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed needs-hw-row No hardware row at the PR head (bot) labels Dec 1, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 77b1d51184a6 (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot]. Row: the hardware row at 77b1d51 that the readiness check found (PR body or comment). CI: linux train L4 = main (after L3) + 34 approved PRs (#3419 dropped: conflicts): Apple driver compile pass, Apple DTBs W=1 pass, planned KUnit ane-boot/clpc/ane-pm/dcp-fabric/dcp-topology/dcp-display/macaudio/asahi/sep all pass, host tests apple-dcp + apple-scaler-recovery pass (the red host-tests on some heads were base failures since fixed on main). The rest of the hosted run is queued behind the backlog. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit aa8264d into main Dec 1, 2026
16 of 46 checks passed
@RyanTheTide
RyanTheTide deleted the feat/scheduled-vertex-scratch branch December 1, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) blast:m2 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:one-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants