Skip to content

drm/asahi: select GPU completion inputs by firmware interface - #2207

Merged
DjDeveloperr merged 1 commit into
mainfrom
j716c/gpu-completion-inputs
Nov 24, 2026
Merged

DjDeveloperr merged 1 commit into
mainfrom
j716c/gpu-completion-inputs

Conversation

@erikwb

@erikwb erikwb commented Nov 18, 2026 •

Copy link
Copy Markdown

Problem

Whether a compute kick's explicit waits on other kicks take the completion class (held in firmware until the producer completes) was a per-board boolean (completion_inputs) that only J714 set. No comment explained why the other M5 boards kept it off, and J716C left firmware-side completion waits unused.

Change

Remove the completion_inputs field from Board in drivers/gpu/drm/asahi/g17/fw/m5/initdata.rs and derive Board::completion_inputs() from the board's static graph family and host encodings (matches!(self.graph.profile, RootProfile::J714G17S26A428) && !self.g17d_forms):

  • On (J714, J716C): boards on M5_GRAPH (RootProfile::J714G17S26A428) without the G17D host encodings (!self.g17d_forms) take completion-class explicit waits with the counted descriptor forms. Any other static graph family keeps them off until its kicks are known to take that form.
  • Off, common interface (J813, J813_26B123): COMMON26_GRAPH / COMMON26B123_GRAPH kicks encode their own forms (Board::j813_forms), with no submission sequence and no retired-parent relaxation, so their waits stay on the host.
  • Off, G17D (J775D): Board::g17d_forms runs compute only with the qualified tuple and entry-signal gate and takes pipelined-class firmware waits; the counted G17S form has not been run on a G17D.

A compile-time const assertion pins the result for every board (J714 and J716C on; J775D, J813, and J813_26B123 off).

On the J716c every compute kick now takes the counted form (ordinal as submission sequence, completion-class parent while it runs), whatever the userspace. A wait on a producer that does not declare a visible completion (DRM_ASAHI_COMPUTE_VISIBLE_COMPLETION) still waits on the host.

Testing

J716c measurements below ran against 27.2 (26B123) G17C firmware via #1173/#1650/#2185, and @satchlj verified 27.0 (26A428) G17C on J775c (G17C B1) in this comment. On the current head (80220ba4d402, rebased onto integration/aurora 275d59d3bc82 to preserve #1958's Board::host_only_render_kicks field and literals), Board::completion_inputs(), its const assertion, and every caller are unchanged.

Static checks and host tests (80220ba4d402 on integration/aurora 275d59d3bc82)

  • ./scripts/checkpatch.pl --strict --git 275d59d3bc82..HEAD: 0 errors, 0 warnings, 0 checks (74 lines checked).
  • arm64 LLVM=1 cross-compile of drivers/gpu/drm/asahi/ (clang 23.1.4, rustc 1.99.0): succeeds cleanly (AR drivers/gpu/drm/asahi/built-in.a).
  • python3 tools/asahi/run-host-tests.py --only g17: 90 of 90 pass.
  • python3 tools/asahi/run-host-tests.py --only asahi: 3 of 3 pass.
  • python3 tools/asahi/run-host-tests.py (framework, Linux 7.3.0-5-cachyos x86_64, clang 23.1.4, Python 3.14.8): 462 of 463 runs pass (all g17 and asahi suites pass; only apple-dcp fails 15 of 93 subtests: panel-takeover-registration, desktop-brightness-notifications, j616s-panel-identity, pm-ownership, controller-lifecycle, usb-unreachable, cpuidle-s2idle, probe-mux-pm-dispatch, parking, masked-context, off-hardening, warm-reset, dwc3-teardown, same-handle-srcu-index, mux-release-stages, unrelated to drivers/gpu/drm/asahi/).

Current-head J716c verification on integration/aurora (275d59d3bc82) + #2185 (d8ad1c90969e) + #2187 (a56f2a5df8db) + #2207 (80220ba4d402) (trial tip 58bd01fd8d15, default command line)

Plain integration/aurora (275d59d3bc82) without unmerged #2185 refuses 27.2 (26B123) GPU firmware (aurora 2302600000.gpu: GPU firmware image not admitted: EINVAL) and without #2187 lacks 27.2 external-display support, so the test base composes integration/aurora (275d59d3bc82) + #2185 (d8ad1c90969e) + #2187 (a56f2a5df8db) + #2207 (80220ba4d402) (trial tip 58bd01fd8d15; arm64 kernel config, LLVM=1, clang 23.1.4). It booted on the J716c's unchanged default kernel command line (27.2 stub) via one-shot aura-try. The J716c devicetree carried #2208's devicetree-only additions (37fee82e714e), enabling manual fan control and SoC hotspot monitoring for Arm A so the fans could be held at their maximum (5,349 and 5,777 RPM) during the benchmark; no kernel code differs from 58bd01fd8d15.

  • GPU bring-up: aurora 2302600000.gpu: GPU firmware: 27.2 (26B123), G17C, M5 firmware graph ready, primary and secondary initdata acknowledged, opening records retired. DRM_IOCTL_ASAHI_GET_PARAMS reports features=0x13e7cfe7c07 (DRM_ASAHI_FEATURE_COMPUTE_VISIBLE_COMPLETION=1, DRM_ASAHI_FEATURE_COMPUTE_NO_QUERY_ACCESS=1).
  • Vulkan CTS (Borealis libvulkan_asahi.so sha256 5d5e96fd542139b5cf501939694d9f404678f03d5f7cf9e224b02250162374ee, deqp-runner --jobs 4, shader cache enabled):
    • dEQP-VK.synchronization*.op.multi_queue.timeline_semaphore.* (8,538 cases): 8,532 Pass, 6 Skip (NotSupported), 0 Fail (40.5 s).
    • dEQP-VK.query_pool.* (18,270 cases): 18,230 Pass, 40 Skip (NotSupported), 0 Fail (9.9 s).
    • dEQP-VK.compute.* (5,000 sampled cases): 1,274 Pass, 3,726 Skip (NotSupported), 0 Fail (18.9 s).
  • Cyberpunk 2077 T2 (2560x1600, Borealis libvulkan_asahi.so sha256 d73d401491d22c7a51279ade2bec791bf525484413d400fc9f9a09c03266b877, 0 driver overrides, performance governor, 140 W AC, fans at maximum): 33.91 FPS (c0, min 27.74), 33.22 FPS (w1, min 28.19), 31.51 FPS (w2, min 26.69), mean 32.88; 0 GPU alerts or device losses, and 0 GPU-pstate-1 samples (no power-brake clamp) in any run.
  • Default-cmdline regression counts (against a boot of the J716c's default kernel taken the same day):
    • SELinux: N/A (Arch ARM without SELinux; 0 AVC denials in the journal).
    • systemctl --failed: 0 new failed units (1 pre-existing aurora-peripherals.service, which also fails on the default-kernel boot).
    • Kernel errors (journalctl -k -b -p err..emerg, boot plus all workloads): 27 lines, the same 27 lines (identical unique set) as the default-kernel boot, so 0 new kernel errors; 0 GPU/MMU/recovery lines in dmesg.

M5 Max (J775c, G17C B1, 27.0 (26A428)) verification (c3ed22c72d1e, #issuecomment-7118663217)

Reported by @satchlj on wt-gpubench-m5 (2e7dae46192a, J775c carry baseline without host_only_render_kicks) + c3ed22c72d1e from #2207 (7.3.0-lobata-m5direct-2207+):

  • GPU bring-up & health: aurora 2302600000.gpu: GPU firmware: 27.0 (26A428), G17C — primary and secondary initdata acknowledged, opening records retired cleanly; 0 SELinux AVC denials, 0 GPU/MMU dmesg lines, 5 pre-existing baseline dmesg -l err..emerg lines (spmi gen4 / aop / dcp).
  • Vulkan CTS (MESA_SHADER_CACHE_DISABLE=1, Mesa ed59bf5c8a):
    • dEQP-VK.synchronization*.op.multi_queue.timeline_semaphore.*: 8,532 Pass, 6 NotSupported, 0 Fail (32 s).
    • dEQP-VK.compute.* (5,000 sampled cases): 731 Pass, 4,269 NotSupported, 0 Fail (121 s).
    • dEQP-VK.ray_query.* (68 compute cases): 68/68 Pass (1 pre-existing watertightness.nomiss.comp.aabbs failure unchanged from baseline).
    • 0 GPU dmesg lines, 0 faults, 0 hangs across >13,600 CTS cases and benchmarks.
  • rt.scene A/B (G17C B1, 27.0 (26A428), Mesa ed59bf5c8a, wt-gpubench-m5 vs + #2207): rt.scene medium (depth=1) 502.1 -> 600.8 fps (+19.7%, CRC d9796615); rt.scene heavy (depth=1) 178.0 -> 189.7 fps (+6.6%, CRC 6d9e7d37); rt.scene extreme (depth=1) 42.0 -> 44.75 fps (+6.5%, CRC 2e01d88e); rt.scene raster (depth=1) 1075.0 -> 1181.3 fps (+9.9%, CRC 96c503ec); rt.scene sweep:blas (depth=2, blas=static) 789.8 fps (+ #2207, CRC d9796615).

Prior-head matched A/B comparison on J716c (e475efad2625 vs 40c03d2e4b2f)

Matched comparison on the J716c (same completion-input implementation and behavior as 80220ba4d402). Two kernels were built with the same arm64 config from the J716c baseline tree (77602a74a746, based on integration/aurora 0abc2f385e54 with the board enablement in #1173, #1650, and #2185): arm A e475efad2625 (with Board::completion_inputs() on for J716C) and control arm B 40c03d2e4b2f (identical except completion_inputs() returns false on every board). Boots alternated (on, off, on, off) with the same J716c daily Mesa build on both arms (exact Mesa SHA not recorded in the original PR run log), the same settings, the desktop up, and the 140 W adapter connected. Each boot ran Cyberpunk 2077 at tier T2 of aurora-silicon/mesa#457 (2560x1600), with 5 launches on stock vkd3d-proton (one launch on the first boot did not start because another benchmark held the lock) and 3 pairs of passes on the aurora-silicon/aurora-steam-native#15 PR build of vkd3d-proton:

Completion inputs on Off (control)
Launches 21 22
Launches that lost the Vulkan device 0 0
GPU recovery, MMU fault or timeout lines in the kernel log 0 0
Stock vkd3d-proton, mean FPS (launches) 25.08 (9: 24.36-25.81) 20.34 (10: 20.19-20.80)
PR vkd3d-proton, mean FPS (passes) 30.04 (12: 29.94-30.16) 21.77 (12: 21.64-21.93)
Timeline-semaphore synchronization CTS (dEQP-VK.synchronization*.op.multi_queue.timeline_semaphore.*, 8,538 cases) 8,532 Pass, 6 NotSupported 8,532 Pass, 6 NotSupported

With completion inputs on, stock vkd3d-proton is 23.3% faster and the PR build 38.0% faster, with 0 device losses across all 43 launches (two earlier losses seen on an earlier head at 3840x2160 did not recur on either arm here).

Still to run

  • Fresh GitHub host-tests CI run on the pushed 80220ba4d402 head (local tools/asahi/run-host-tests.py --only g17 90/90 and --only asahi 3/3 pass).

@RyanTheTide

Copy link
Copy Markdown

Thanks for the Cyberpunk numbers; +25% is a big gain.

We try to select behaviour by a hardware or firmware property rather than by the board it was measured on. This flips the per-board flag for one more machine (drivers/gpu/drm/asahi/g17/fw/m5/initdata.rs:2470, completion_inputs: true on J716C), while J714 has it and J775D and J813 do not, and nothing in the code says why they differ.

Whether explicit waits can take the firmware's completion class is a property of the firmware interface, not of the board. Could you make it depend on that (the firmware build/layout that supports it), or turn it on for every M5 board and remove the field? If some board must keep it off, a comment with the reason would be the way. Before that, the two lost Vulkan devices you mention need the matched comparison with completion inputs disabled. We can help with rows on other machines.

@erikwb
erikwb force-pushed the j716c/gpu-completion-inputs branch from 313543d to aa1abb9 Compare November 21, 2026 17:45
@erikwb

erikwb commented Nov 21, 2026

Copy link
Copy Markdown
Author

Note

🤖 Claude Opus 5.5 responding on behalf of erikwb

Thanks. The field is gone: Board::completion_inputs() is now derived from the firmware interface and the host encodings (aa1abb9). It matches the T6050 M5 graph layout (RootProfile::J714G17S26A428) positively, so a future board on another layout doesn't inherit it.

Why the four boards differed, from the history:

  • 8aee10d (M5 Pro firmware waits) added the flag and turned it on for the J714 only, because that is where the counted form (completion-class waits, the ordinal as submission sequence, the qualified dispatch base with auxiliary control only for a pipelined parent) was measured. The J716c and the J775D were left false. That commit measured only the J714 and gives no firmware reason for the other two.
  • 482acb1 and 4b06516 (J813 bring-up and its kicks) added the J813 with false. The J813 runs the common firmware interface (26A428/26B123 graph), not the T6050 one, and its kicks have their own forms (j813_forms): every dependency already takes class 1, there is a fixed completion identity, and there is no submission sequence.

What the code now says:

  • On: boards on that layout with the G17S/G17C host encodings. The J714 is unchanged and the J716c is turned on. The J716c runs the same T6050 firmware interface as the J714.
  • Off, common interface (J813): its kicks carry no submission sequence and no retired-parent relaxation, so the M5 graph's counted form isn't that interface's. Its waits stay on the host, as before.
  • Off, G17D (J775D): its compute only runs with the qualified tuple and the entry-signal gate, and its firmware waits take the pipelined class. The G17S counted form has never run on a G17D, and a wrong kick form there never completes. So it stays off until someone with a J775D tries it. We can't do that.

These reasons are now comments on Board::completion_inputs(), and a compile-time check pins the result for each board. Behaviour changes only on the J716c. There, every compute kick takes the counted form regardless of userspace. A wait on a producer that doesn't declare a visible completion still waits on the host.

On the two lost devices, the matched run is done:

Completion inputs on Off (control)
Launches 21 22
Launches that lost the Vulkan device 0 0
GPU recovery, MMU fault or timeout lines in the kernel log 0 0
Stock vkd3d-proton, mean FPS (launches) 25.08 (9: 24.36–25.81) 20.34 (10: 20.19–20.80)
PR vkd3d-proton, mean FPS (passes) 30.04 (12: 29.94–30.16) 21.77 (12: 21.64–21.93)
Timeline-semaphore synchronization CTS (dEQP-VK.synchronization*.op.multi_queue.timeline_semaphore.*, 8,538 cases) 8,532 Pass, 6 NotSupported 8,532 Pass, 6 NotSupported

With completion inputs on, stock vkd3d-proton is 23.3% faster and the PR build 38.0% faster. Neither arm lost the device in these 43 launches. The two earlier losses didn't recur on either kernel, so this run doesn't tie them to completion inputs; it also can't rule out a rare loss. The description has the same table.

Rows on other machines would help: a J714 with this head should see no change, and a J775D or J813 should see no change either.

@RyanTheTide

Copy link
Copy Markdown

Thanks, this resolves the review. Board::completion_inputs() now follows the firmware interface (the T6050 M5 graph layout) and the host encodings instead of a per-board field, and the comments give the reasons the J813 (common interface, no submission sequence in its kicks) and the G17D (pipelined-class waits, different kick tuple) stay off. The compile-time check pinning each board is a good touch. The matched run answers the stability question: 0 device losses in 43 launches on either side, identical timeline-semaphore CTS, and the gain holds with stock vkd3d-proton.

Since behaviour only changes on the J716c, where it is measured, we have no further rows to ask for.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown

Merge-train adversarial review (MERGETRAIN-LINUX2) at aa1abb9: NO BLOCKERS.

Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below.

Full review

#2207 drm/asahi: enable GPU completion inputs on J716c @aa1abb9a

VERDICT: NO BLOCKERS

Checked:

  • One commit with only Signed-off-by: Erik Bourget. The PR body ends with Assisted-by: LLM (Claude:Opus 5.5).
  • The completion_inputs field is removed from every Board literal. The merged tree (b241e35 + head) has no leftover completion_inputs: initializer, and J813_26B123 has no explicit field.
  • completion_inputs() (initdata.rs:2939-2941 on the head) is graph.profile == J714G17S26A428 && !g17d_forms.
  • The const assert pins the result: J714 and J716C on, J775D, J813 and J813_26B123 off. J714, J775D and J813 behave as before.

Effects on J716C:

  • explicit_dependency → class 1.
  • counted_forms/parent_dependency → counted.
  • kick_tuple → NORMAL preempt offset + QUALIFIED dispatch base (compute.rs:154-170).
  • host_producer_waits false and firmware_sources_need_visible_completion true (runtime/backend.rs:128-133).
  • The uAPI feature DRM_ASAHI_FEATURE_COMPUTE_VISIBLE_COMPLETION is now advertised on J716C (g17/mod.rs:2546).
  • All of this is what was measured.

Nits:

  1. initdata.rs:2926-2930: the doc comment says the selection "follows the firmware interface the board runs". Board::graph is static, though: J714, J716C and J775D all point at M5_GRAPH, whose profile is always J714G17S26A428.
  2. On integration/aurora alone, the J716c's 27.2 (26B123) G17C firmware is not identified (drm/asahi: t6050: identify the M5 Max's 27.2 (26B123) G17C firmware (on #1650) #2185 is unmerged). The pinned production firmware therefore can't reach this code on the base yet, and all measurements used the unmerged stack.
  3. RootProfile::J714G17S26A428 is named after a board and a firmware build. This is existing naming, not added here, but it is the reason the "firmware property" reads like a board gate.

Missing rows:

@DjDeveloperr DjDeveloperr 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.

Review at aa1abb9a8ce5: 0 code, CI, policy, or attribution blockers.

Checked:

  • Interface selection (§1): Removes the per-board completion_inputs field from Board and derives Board::completion_inputs() from matches!(self.graph.profile, RootProfile::J714G17S26A428) && !self.g17d_forms, with clear comments explaining why J813 (common interface, no submission sequence / retired-parent relaxation) and J775D (G17D qualified tuple + pipelined waits) stay off, plus a compile-time const assertion pinning all five board definitions so J714, J775D, and J813 are unchanged.
  • Attribution (§4) & CI: Commit aa1abb9a8ce5 carries human author/committer and Signed-off-by: only; host-tests is green.
  • Performance & conformance (§5): The alternating matched A/B on J716c is solid (43 Cyberpunk launches, 0 Vulkan device losses on either arm, 0 GPU recovery/MMU fault/timeout lines, +23.3% stock / +38.0% PR vkd3d-proton, and identical 8,532 Pass / 6 NotSupported timeline-semaphore CTS).

Non-blocking nit:

  • drivers/gpu/drm/asahi/g17/fw/m5/initdata.rs:2926-2930: the doc comment says the check "follows the firmware interface the board runs", whereas self.graph.profile is the static M5_GRAPH family (J714G17S26A428) even when runtime 27.2 selects M5_GRAPH_26B123 (works identically on 27.0 and 27.2, just slightly imprecise wording).

Still owed before approval/merge (§5):

  • Full regression counts on the default kernel command line (0 SELinux denials, 0 failed units, 0 new kernel errors).
  • A J716c confirmation row on integration/aurora once #2185 lands (since the A/B measurements were run on the unmerged #1173/#1650/#2185 stack).

Assisted-by: LLM (Gemini 4 Neon)

@erikwb
erikwb force-pushed the j716c/gpu-completion-inputs branch from aa1abb9 to c3ed22c Compare November 22, 2026 19:23
@erikwb
erikwb marked this pull request as draft November 22, 2026 19:25
@erikwb

erikwb commented Nov 22, 2026

Copy link
Copy Markdown
Author

Note

🤖 Gemini 4 Hydrogen responding on behalf of erikwb

Updated the Board::completion_inputs() doc comment in drivers/gpu/drm/asahi/g17/fw/m5/initdata.rs and rebased onto integration/aurora (f5fae3cbb047, head c3ed22c72d1e).

  • Doc comment (initdata.rs:2957-2961): clarified that Board::completion_inputs() keys on the board's static graph family (M5_GRAPH, RootProfile::J714G17S26A428) and host encodings (!self.g17d_forms), rather than claiming it inspects the runtime firmware build.
  • Unchanged implementation: only the doc comment changed after aa1abb9a8ce5, so the const assertion pinning J714, J716C, J775D, J813, and J813_26B123 and the matched J716c A/B (43 Cyberpunk T2 launches per aurora-silicon/mesa#457 comparing 7.3.0-ewb271+ vs control 7.3.0-ewb272+, 0 device losses, +23.3% stock / +38.0% aurora-silicon/aurora-steam-native#15 vkd3d-proton, 8,532/8,538 timeline-semaphore CTS) still apply.
  • Host tests: python3 tools/asahi/run-host-tests.py passes 460/461 on c3ed22c72d1e (framework, clang 23.1.4, Python 3.14.8); --only apple-dcp fails the exact same 15/92 subtests on both c3ed22c72d1e and base f5fae3cbb047 in that environment (unrelated to drivers/gpu/drm/asahi/).
  • Draft status: returning this PR to draft until both the full default-cmdline regression counts (SELinux denials, failed units, new kernel errors) and the post-drm/asahi: t6050: identify the M5 Max's 27.2 (26B123) G17C firmware (on #1650) #2185 integration/aurora J716c confirmation row are recorded.

@RyanTheTide

Copy link
Copy Markdown

Re-checked at c3ed22c. Range-diff against aa1abb9: the only change is the doc comment on Board::completion_inputs(), plus a rebase onto the current integration/aurora.

  • The comment now says the check keys on the static graph family (M5_GRAPH, static profile J714G17S26A428) and the absence of the G17D encodings (g17/fw/m5/initdata.rs:2957-2961). That matches the code and settles the wording point from the last review.
  • Code, the const assert and every completion_inputs() caller are unchanged. The rebase adds no Board and changes no graph, so J714, J775D and J813 still behave as before. The head merges cleanly onto the current integration/aurora.
  • Still one commit, with only Signed-off-by: Erik Bourget.

Nothing new from us. The earlier J716c A/B still covers this head. The remaining items are the ones already listed: a J716c row on integration/aurora once #1173/#1650/#2185 land, and the default-cmdline regression counts.

Assisted-by: LLM (Claude:Opus 5.5)

@erikwb
erikwb marked this pull request as ready for review November 22, 2026 19:26
@erikwb

erikwb commented Nov 22, 2026

Copy link
Copy Markdown
Author

Note

🤖 Gemini 4 Neon responding on behalf of erikwb

Ran a J716c trial kernel (7.3.0-ewb275+, build tip 411c115c3756: integration/aurora e0a9448a75df merged with #2185 d8ad1c90969e + cherry-picked source PR head c3ed22c72d1e, built with config-ewb252 and booted on the unchanged default kernel command line via one-shot aura-try) and recorded the results in the PR body:

  • GPU bring-up: aurora 2302600000.gpu probed cleanly (M5 firmware graph ready, primary and secondary initdata acknowledged, opening records retired, /dev/dri/renderD128 active).
  • Vulkan CTS (Borealis libvulkan_asahi.so sha256 bda8b9c1..., MESA_SHADER_CACHE_DISABLE=true):
    • dEQP-VK.synchronization*.op.multi_queue.timeline_semaphore.* (8,538 cases): 8,532 Pass, 6 NotSupported, 0 Fail (43.9 s), 0 GPU dmesg lines.
    • dEQP-VK.compute.* (5,000 sampled cases): 1,274 Pass, 3,726 NotSupported, 0 Fail (50.8 s), 0 GPU dmesg lines.
  • Default-cmdline regression counts (on this stacked 7.3.0-ewb275+ trial boot; no standalone integration/aurora baseline boot was taken):
    • SELinux: N/A (Arch ARM without SELinux; 0 AVC denials).
    • systemctl --failed: 0 new failed units (1 pre-existing aurora-peripherals.service, matching default 7.3.0-ewb270+).
    • dmesg --level=err,crit,alert,emerg: 0 GPU/aurora/asahi/MMU errors across boot and both CTS suites (39 non-GPU boot-time lines on this stacked boot from external DP controllers without unmerged #2187, apple_sep without #2162, Thunderbolt Ethernet of_irq_parse_pci, and systemd-gpt-auto-generator; 0 new errors during workloads).
  • Onscreen Cyberpunk 2077 T2 note: two onscreen T2 launch attempts on 7.3.0-ewb275+ produced no benchmark result because external DP controllers crashed without #2187, so the Cyberpunk T2 performance gain remains scoped to the earlier matched 7.3.0-ewb271+ vs 7.3.0-ewb272+ A/B.
  • Plain reboot cleanly restored default 7.3.0-ewb270+.

Remaining in Still to run: post-merge integration/aurora J716c confirmation (including standalone baseline counts and onscreen T2 once #1173/#1650/#2185/#2187 land) and J714 no-regression confirmation for the rewritten Board::completion_inputs() selector.

@RyanTheTide

Copy link
Copy Markdown

Review at c3ed22c: one blocker, on proof, not on the code.

Since aa1abb9 only the doc comment on Board::completion_inputs() changed, plus the rebase (range-diff). The selector, the const assert and all callers are the same; a test merge onto integration/aurora 6732e74 is clean and leaves no completion_inputs: initializer behind. One commit, human Signed-off-by only. CI is host-tests only (green); the asahi Rust driver is not compiled by CI, so the build rests on the author's arm64 compile.

Blocking:

  1. The only J716c firmware integration/aurora admits is 27.0 (26A428) G17C (hw/t6050.rs, CONFIG_MAX), and that is the one combination nobody has run with the counted form. The J714 work measured G17S. Every J716c row here (the A/B, both CTS runs, the default-cmdline counts) ran on the drm/asahi: M5: InitData for the macOS 27.2 and 27.3 firmware (G17S bring-up on J716s) #1173/drm/asahi: t6050: identify the K114/K116 27.2 (26B8125) G17S firmware (on #1173) #1650/drm/asahi: t6050: identify the M5 Max's 27.2 (26B123) G17C firmware (on #1650) #2185 stack, which exists to run the 27.2 (26B123) G17C build; the PR names no run on a 27.0 stub. The selector keys on the static graph family, not on the running build, so once this merges a J716c on a 27.0 stub gets the new kick form with no measurement behind it, and a wrong form does not fail softly (the commit that introduced the flag notes the old form hangs as soon as a parent takes class 1). Our earlier review said the code was unreachable on the base until drm/asahi: t6050: identify the M5 Max's 27.2 (26B123) G17C firmware (on #1650) #2185; that was wrong for the 27.0 stub.

    Either of these clears it:

No other findings. The selector is derived from existing board data and adds no parameter; J714, J775D and both J813 entries are pinned unchanged by the const assert.

Nit: the PR title still says "enable ... on J716c" while the commit selects by graph family; worth aligning before the merge commit is written.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr 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.

Formal §1–§6 re-review at c3ed22c72d1e.

Zero code, policy, or attribution blockers:

  • §1–§4 & CI: Board::completion_inputs() derives completion-input selection from the static M5_GRAPH family (RootProfile::J714G17S26A428) and !self.g17d_forms, the doc comment nit from aa1abb9a is cleanly fixed (initdata.rs:2957-2961), the compile-time const assertion pins J714, J716C, J775D, J813, and J813_26B123, commit c3ed22c72d1e carries human author/committer and Signed-off-by: only, the PR body ends with Assisted-by:, host-tests CI is green, and the branch is MERGEABLE CLEAN.
  • J716c 27.2 (26B123) verification: The matched A/B (7.3.0-ewb271+ vs ewb272+, 43 Cyberpunk launches, 0 device losses, +23.3% / +38.0% FPS) and current-head 7.3.0-ewb275+ CTS run (8,532/8,538 timeline-semaphore + 1,274/5,000 compute, 0 GPU dmesg lines) are strong evidence for 27.2 G17C.

Remaining Blocker

  1. §5 Evidence — unproven on integration/aurora's admitted 27.0 (26A428) G17C firmware (hw/t6050.rs CONFIG_MAX):
    • On current integration/aurora, drivers/gpu/drm/asahi/hw/t6050.rs (CONFIG_MAX) already admits 27.0 (26A428) G17C for J716C, while #2185 (27.2 / 26B123 G17C) is still open. Because Board::completion_inputs() keys on the static M5_GRAPH family rather than the runtime firmware build, merging #2207 now activates the counted compute kick form on 27.0 G17C with zero hardware runs on that firmware (every J716c run here — the A/B and 7.3.0-ewb275+ — ran on the unmerged #1173/#1650/#2185 27.2 stack, and ewb275+ had no standalone integration/aurora baseline). A mismatched kick form hangs rather than failing softly.
    • To clear (either path):
      1. Run a J716c verification row on a 27.0 (26A428) stub with plain integration/aurora + c3ed22c72d1e on the default kernel command line (timeline-semaphore multi-queue CTS + compute CTS sample, 0 GPU/MMU dmesg lines, and default-cmdline regression counts vs baseline); or
      2. Hold this PR behind #1173/#1650/#2185, then post the plain integration/aurora J716c confirmation row once #2185 lands (explicitly documenting 27.0 G17C coverage or scoping).

Non-blocking nit: align the PR title with the commit subject (select GPU completion inputs by firmware interface) before merge.

Assisted-by: LLM (Gemini 4 Neon)

@erikwb erikwb changed the title drm/asahi: enable GPU completion inputs on J716c drm/asahi: select GPU completion inputs by firmware interface Nov 23, 2026
@erikwb

erikwb commented Nov 23, 2026

Copy link
Copy Markdown
Author

Note

🤖 Gemini 4 Hydrogen responding on behalf of erikwb

Confirmed against drivers/gpu/drm/asahi/hw/t6050.rs (CONFIG_MAX) and drivers/gpu/drm/asahi/g17/fw/m5/initdata.rs (Board::completion_inputs()) at c3ed22c72d1e: CONFIG_MAX admits 27.0 (26A428), G17C today, and the static Board::completion_inputs() selector will still enable counted kicks on 27.0 G17C even after #2185 adds 27.2 (26B123). No 27.0 (26A428) G17C run has been performed on J716c yet (all J716c runs recorded here used 27.2 (26B123) via #1173/#1650/#2185).

Holding #2207 before merge until either:

  • the J716c 27.0 (26A428) G17C CTS row is run on integration/aurora + c3ed22c72d1e, or
  • a maintainer explicitly accepts that remaining 27.0 gap alongside the post-#1173/#1650/#2185 integration/aurora J716c confirmation row.

Updated the PR description (Testing and Still to run) accordingly, replaced local build names with source SHAs, and we are aligning the PR title with the interface-based commit subject (drm/asahi: select GPU completion inputs by firmware interface).

Whether a compute kick's explicit waits on other kicks take the completion
class, held in firmware until the producer completes, was a per-board flag
that only the J714 set. It is a property of the firmware interface and the
host encodings, not of the board: derive it from them and drop the field.

Boards on the T6050 firmware's M5 graph layout (J714G17S26A428) with the
G17S/G17C host encodings take completion inputs. The layout is matched
positively, so a board on any other layout keeps them off. This turns
them on for the J716c (G17C) as well as the J714. The common interface
(the J813) keeps its own kick forms, and the G17D keeps its qualified
tuple and pipelined firmware waits; the reason for each is beside
Board::completion_inputs(). A compile-time check pins the result for
every board.

On the J716c every compute kick now takes the counted form. A wait on a
producer that does not declare a visible completion still waits on the
host.

Signed-off-by: Erik Bourget <erik@ebourget.net>
@satchlj

satchlj commented Nov 24, 2026

Copy link
Copy Markdown
Member

Gemini 4 Neon on @satchlj's behalf.

Hardware verification on M5 Max (t6050 / J775c, G17C B1, GPU firmware 27.0 (26A428)) — directly validating Board::completion_inputs() == true on 27.0 (26A428) (the firmware version that previously needed verification):

Build & Boot

  • Base + patch: wt-gpubench-m5 (2e7dae46192a, J775c carry baseline without host_only_render_kicks) + c3ed22c72d1e from #2207 (clean apply, 0 conflicts; note #2207 itself still needs rebase over host_only_render_kicks on current integration/aurora).
  • Toolchain: Built with patched tools/aurora-bindgen (bindgen 0.73.2, ZERO_BINDGEN_WARNINGS).
  • Kernel: 7.3.0-lobata-m5direct-2207+ #2 SMP PREEMPT Mon Nov 23 19:52:48 EST 2026 aarch64
  • Firmware bring-up: aurora 2302600000.gpu: GPU firmware: 27.0 (26A428), G17C — primary and secondary initdata acknowledged, opening records retired cleanly.
  • Health: 0 SELinux AVC denials, 0 GPU/MMU dmesg lines, 5 pre-existing baseline dmesg -l err..emerg lines (spmi gen4 / aop / dcp).

CTS Results (MESA_SHADER_CACHE_DISABLE=1, Mesa ed59bf5c8a)

  • dEQP-VK.synchronization*.op.multi_queue.timeline_semaphore.*: 8,532 Pass / 6 NotSupported / 0 Fail (32 s) — exact match with 27.2 (26B123).
  • dEQP-VK.compute.* (5,000 sampled cases): 731 Pass / 4,269 NotSupported / 0 Fail (121 s).
  • dEQP-VK.ray_query.* (68 compute cases across ray_flags, builtin, multiple_ray_queries, traversal_control, barycentric_coordinates, triangle watertightness): 68/68 Pass (1 pre-existing watertightness.nomiss.comp.aabbs failure unchanged from baseline).
  • Faults / hangs: 0 GPU dmesg lines, 0 faults, 0 hangs across all >13,600 CTS cases and benchmarks.

rt.scene Performance Impact (G17C B1, 27.0 (26A428), Mesa ed59bf5c8a)

Workload wt-gpubench-m5 (completion_inputs: false) + #2207 (completion_inputs: true) Delta CRC
rt.scene medium (depth=1) 502.1 fps 600.8 fps +19.7% d9796615
rt.scene heavy (depth=1) 178.0 fps 189.7 fps +6.6% 6d9e7d37
rt.scene extreme (depth=1) 42.0 fps 44.75 fps +6.5% 2e01d88e
rt.scene raster (depth=1) 1075.0 fps 1181.3 fps +9.9% 96c503ec
rt.scene sweep:blas (depth=2, blas=static) — 789.8 fps — d9796615

27.0 (26A428) on G17C handles firmware-side completion_inputs cleanly with zero regressions and a substantial cross-queue pipelining gain (+19.7% on rt.scene medium).

@DjDeveloperr DjDeveloperr 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.

Acknowledging @satchlj's live 27.0 (26A428) G17C hardware verification on J775c (#issuecomment-7118663217: 8,532/8,532 timeline-semaphore CTS, 731 compute CTS, 68/68 ray_query CTS, +19.7% rt.scene medium, 0 GPU/MMU dmesg lines, 0 SELinux denials) — that clears the remaining §5 27.0 (26A428) G17C blocker from my earlier review.

Only remaining step before approval is rebasing onto current integration/aurora (currently CONFLICTING over host_only_render_kicks) with green host-tests CI. Ping once rebased and I'll re-verify and approve promptly.

Assisted-by: LLM (Gemini 4 Neon)

@erikwb
erikwb force-pushed the j716c/gpu-completion-inputs branch from c3ed22c to 80220ba Compare November 24, 2026 03:08
@erikwb

erikwb commented Nov 24, 2026

Copy link
Copy Markdown
Author

Note

🤖 Gemini 4 Hydrogen responding on behalf of erikwb

@DjDeveloperr Rebased onto integration/aurora (275d59d3bc82, head 80220ba4d402) to resolve the conflict with #1958 (efbb40ec725d, Board::host_only_render_kicks) in drivers/gpu/drm/asahi/g17/fw/m5/initdata.rs, and folded @satchlj's 27.0 (26A428) G17C verification (comment) into the PR description (clearing the 27.0 item from Still to run).

  • Conflict resolution: Kept Board::host_only_render_kicks and its J714, J716C, J775D, and J813 initializers (plus the existing J716C comment) intact, while keeping completion_inputs: bool removed. Board::completion_inputs(), the const assertion pinning all five boards (J714, J716C, J775D, J813, J813_26B123), and all callers are unchanged from c3ed22c72d1e.
  • Checks on 80220ba4d402:
    • ./scripts/checkpatch.pl --strict --git 275d59d3bc82..HEAD: 0 errors, 0 warnings, 0 checks (74 lines checked).
    • arm64 LLVM=1 cross-compile of drivers/gpu/drm/asahi/: succeeds cleanly.
    • python3 tools/asahi/run-host-tests.py: 462 of 463 runs pass (--only g17: 90/90, --only asahi: 3/3; only apple-dcp fails 15 of 93 subtests, unrelated to drivers/gpu/drm/asahi/).
  • Hardware verification:
    • 27.0 (26A428) G17C on J775c (#issuecomment-7118663217): 8,532 timeline-semaphore / 731 compute / 68 ray_query CTS pass (0 new fails), +19.7% rt.scene medium, 0 GPU/MMU dmesg lines, 0 SELinux AVC denials.
    • 27.2 (26B123) G17C on J716c (80220ba4d402 composed over integration/aurora 275d59d3bc82 + #2185 d8ad1c90969e + #2187 a56f2a5df8db, default command line; plain 275d59d3bc82 refuses the 27.2 GPU firmware without #2185; the J716c devicetree carried #2208's devicetree-only 37fee82e714e enabling manual fan control and SoC hotspot monitoring for Arm A, with no kernel code differing from 58bd01fd8d15): DRM_ASAHI_FEATURE_COMPUTE_NO_QUERY_ACCESS and DRM_ASAHI_FEATURE_COMPUTE_VISIBLE_COMPLETION both reported; dEQP-VK.synchronization*.op.multi_queue.timeline_semaphore.* 8,532 Pass / 6 Skip / 0 Fail; dEQP-VK.query_pool.* 18,230 Pass / 40 Skip / 0 Fail; dEQP-VK.compute.* sample 1,274 Pass / 3,726 Skip / 0 Fail; Cyberpunk 2077 T2 33.91 / 33.22 / 31.51 FPS (mean 32.88, no GPU-pstate clamp); 0 GPU/MMU/recovery dmesg lines, 0 AVC denials, 0 new failed units, 0 new kernel errors against a same-day default-kernel boot. Details are in the PR description.
  • CI: Fresh GitHub host-tests CI will run once 80220ba4d402 is pushed, and this will be ready for re-check against @DjDeveloperr's review (drm/asahi: select GPU completion inputs by firmware interface #2207 (review)) once it passes.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026

@DjDeveloperr DjDeveloperr 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.

Checked interface-driven GPU completion input selection, clean commit history, green host-tests CI, and J775c/J716c verification rows. No blocking findings.

@DjDeveloperr
DjDeveloperr merged commit cb7ea62 into main Nov 24, 2026
2 checks passed
@DjDeveloperr
DjDeveloperr deleted the j716c/gpu-completion-inputs branch November 24, 2026 18:39
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) changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants