Skip to content

drm/asahi: g17: M4 Pro 25G83: stage-prefixed renders and render identity at create - #3463

Merged
RyanTheTide merged 2 commits into
mainfrom
fix/g17-m4pro-25g83-measured-flags
Nov 28, 2026
Merged

RyanTheTide merged 2 commits into
mainfrom
fix/g17-m4pro-25g83-measured-flags

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What: turn on two G17 host flags for the M4 Pro (T6040) 25G83 firmware that were off only as "not measured":

  • render_stage_prefixes: GET_PARAMS now advertises RENDER_STAGE_PREFIXES_V2, so Borealis sends staged and compute-prefixed renders on the M4 Pro. Without it, the staged-render work in drm/asahi: g17: support staged and compute-prefixed renders in render_direct() #3388 (render_direct for staged/compute-prefixed renders) never reaches the M4 Pro.
  • render_id_at_create: take the render pool identity at context creation (host policy).

The M4 Max already runs the same 25G83 firmware train with both on (ec3ced9). The A18 Pro has both on. This PR sets them in V25G83 and drops the now-redundant M4 Max 25G83 overrides. V25F84 (and V26B123, which inherits it) is pinned to the previous values until measured, so only the T6040 25G83 build changes behaviour. Part of the chip-gate audit in lane GPU-UNGATE (Ryan: M5/A18 Pro work must reach the M4 Pro unless the hardware or firmware lacks it).

Tested: J616s M4 Pro (T6040, 25G83) at 79319fd9 (these two commits on main 30dd09b + #3388; the touched files are byte-identical to head 95b8c0d): 0 CTS regressions in 37,406 cases, 0 GPU faults, 0 failed units, default restored.

Details on the J616s (M4 Pro, T6040, "Apple GFX 25G83 for T6040"). Same-tree A/B, one one-shot boot each: A = main 30dd09b + #3388 6d28e86, B = A + these two commits. Both commits are byte-identical to the tested ones for the touched files, and main has not changed them since.

  • GET_PARAMS: STAGE_PREFIXES_V2 0 -> 1.
  • VK CTS 1.4.7.1, 37,406 cases (synchronization smoke/basic, synchronization2 single-queue barrier, timeline_semaphore, cross_instance, occlusion_query, concurrent_queries, multiview.queries, compute basic, api.smoke, simple_draw): 16,089 Pass -> Pass, 21,317 NotSupported -> NotSupported, 0 regressions.
  • G17 pool churn (92-process waves + 300 serial create/close) and >=3 concurrent GPU clients: 0 errors on both arms. The same 3 LogicalQueues capacity refusals appear on both arms during the 40-process wave (baseline). Capacity returns to baseline.
  • 0 oops, 0 GPU faults on both arms.
  • gpubench (41 cases, 2 runs per arm): median +0.11% (neutral). One consistent cost: submit.empty +5% (1.34 -> 1.42 us/submit, about 0.08 us), and compute.light single queue d4-d16 +2-4%. gpubench has no compute->render prefix dependencies, so the drm/asahi: g17: support staged and compute-prefixed renders in render_direct() #3388 gain is not exercised here; the M5 Pro numbers in drm/asahi: g17: support staged and compute-prefixed renders in render_direct() #3388 are the reference for that.
  • tools/asahi/run-host-tests.py --only g17: 242/242 on current main.

Risk: two-way door. T6040 25G83 only. Revert = flip the two flags back.

Not yet: a workload with compute-prefixed renders on the M4 Pro (GTA V / chainbench_diag class) to show the gain, and 25F84 / 26B123 measurements.

Evidence: traces/gpu/20261128-gpu-ungate/j616s-k1/ (lab store).

The M4 Pro 25G83 variant kept render_stage_prefixes off as not measured,
so GET_PARAMS never advertised RENDER_STAGE_PREFIXES_V2 there and
Borealis never sent staged or compute-prefixed renders. The M4 Max runs
the same 25G83 firmware train with the flag on (ec3ced9), and the A18
Pro has it on.

Turn it on in V25G83 and drop the now redundant M4 Max 25G83 override.
25F84 (and 26B123, which inherits it) keeps it off until measured there.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
V25G83 kept the first-render claim of the render pool identity because
the M4 Pro had not been tested with the claim at creation. The M4 Max
runs the same 25G83 firmware train with it on (ec3ced9), as does the
A18 Pro. The claim is host policy: with it, a context that cannot get
an identity fails at creation instead of at its first render.

Turn it on in V25G83 and drop the now redundant M4 Max 25G83 override.
25F84 keeps the first-render claim; the M4 Max 26B123 override stays.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners November 28, 2026 02:25

@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 95b8c0dd (once queued KUnit CI finishes green)

Blockers: none (queued KUnit and readiness checks are still running; merge once green).

Checked:

  • drivers/gpu/drm/asahi/g17/fw/variant.rs:115-268: verified render_stage_prefixes and render_id_at_create are enabled in V25G83 while V25F84 explicitly pins both to false so V25F84 and V26B123 (which inherits V25F84) do not change behavior.
  • drivers/gpu/drm/asahi/hw/t6041.rs:208-218: verified removing the now-redundant overrides from BUILD_25G83 preserves identical T6041 25G83 fields.
  • Checked all V25G83 references across drivers/gpu/drm/asahi/hw/: only t6040.rs (BUILD_25G83) and t6041.rs (BUILD_25G83) inherit V25G83, so only M4 Pro (T6040) 25G83 changes behavior.
  • Verified J616s M4 Pro (T6040, 25G83) A/B hardware results (GET_PARAMS STAGE_PREFIXES_V2 0 -> 1, 37,406 VK CTS cases with 0 regressions, pool churn and concurrent client waves clean, 0 GPU faults, gpubench neutral).
Evidence
  • Diff reviewed at 95b8c0dd: drivers/gpu/drm/asahi/g17/fw/variant.rs, drivers/gpu/drm/asahi/hw/t6041.rs.
  • git grep -n V25G83 -- drivers/gpu/drm/asahi/hw/: only t6040.rs:122 and t6041.rs:217.
  • CI at review time: apple-build, host-tests, pr-text, KUnit ane-boot, ane-pm, dcp-fabric, dcp-topology PASS; remaining KUnit jobs and readiness queued.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merge-train status at 95b8c0dd: App-approved. It flips render_stage_prefixes and render_id_at_create to true for the M4 Pro 25G83 firmware variant only; the M4 Max 25G83 already has both. 25F84 and 26B123 stay false, so no other firmware or family changes. Row: J616s A/B, 37,406 CTS with 0 regressions. @DjDeveloperr code-owner ping (6-point rule, point 6): merge earliest 17:06 AEDT once KUnit is green. Revert: git revert -m 1 <merge>.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Merge readiness at 95b8c0dd: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
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 95b8c0dd
Conflicts ok none
PR text ok Risk: two-way · . T6040 25G83 only. Revert = flip the two flags back.

Areas: area:gpu

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

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule at 95b8c0dd. (1) The review App approved at this head. (2) Hosted CI is green except a stale pr-text result from before the last body edit (the rerun is stuck in the runner backlog); the canonical pr-text.sh passes locally on the current body. (3/4) Rows: J616s (M4 Pro 25G83 variant only). (5) No blocking review at this head. (6) Dj was pinged more than 1 h ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit 54a3c11 into main Nov 28, 2026
20 of 25 checks passed
@RyanTheTide
RyanTheTide deleted the fix/g17-m4pro-25g83-measured-flags branch November 28, 2026 14:03
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:m4 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-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.

1 participant