Repository navigation
drm/asahi: g16: map the render notifier records ASC-cached - #3298
DjDeveloperr wants to merge 3 commits into
Conversation
The firmware reads and updates the render notifier records (TA at +0, FS at +0x200 of one page) around every finished TA and FS pass. G16 mapped that page uncached, so each finished pass paid for uncached firmware loads and stores on the path between passes. macOS 26B123 maps its notifier records ASC-cached and keeps the service stamps in separate uncached cells; the previous commit does the same for compute. Map the render notifier page ASC-cached. The host writes it only before the firmware first sees it and never reads it back. Move the TA and FS service stamps from that page to the TA and FS queues' own uncached user-stamp cells, which the render receipt now reads. Drop the reads of the records' context words from the render receipt, as the previous commit does for compute: the service stamps are device-wide draw stamps, so a stamp equal to a flight's target names that flight. On the J773g (M4 Mac mini), against the previous commit (A/B/B/A over four boots): render.light tri d16 +9.1 %, d64 +8.6 %, render.postfx 1080p MSAA4 d2 +7.7 %, render.bindless_ubo d2 +8.3 %, query occlusion d16 +9.2 %, concurrent.cr interleave +5.3 %, render.mdi d4 +4.6 %; render.shadow d16 depth-only d2 is 3.2 % slower. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: HOLD at d49f3e75
Blockers:
- Targets open non-
mainbase branchperf/g16-compute-notifier-cached(#3285is stillOPEN); fullmainCI has not run.
Checked:
- Verified
#3285is stillOPENand base ref isperf/g16-compute-notifier-cached. - Deferred final approval until
#3285lands and this PR is retargeted ontomainwith green CI.
Evidence
- Base ref:
perf/g16-compute-notifier-cached(#3285state:OPEN).
Signed-off-by: DjDeveloperr <hey@djdev.me>
There was a problem hiding this comment.
Verdict: HOLD at caa89940 for hosted CI and shared G16 backend hardware evidence.
Checked: #3285 merged and this branch now targets main. The render completion path reads the separate uncached TA/FS service stamp cells, and the updated fixture asserts no reads of the cached notifier page. Four of the six PR-path blobs differ from the J773g-tested d49f3e75 after the forward merge. Keep that result attributed to its tested tree and provide current-head evidence or maintainer acceptance of equivalence. The second G16 chip and shared G15S backend rows listed in the PR remain open.
There was a problem hiding this comment.
Verdict: HOLD at d77a6c6
Blockers: Current-head hosted checks and current or equivalent G16 hardware evidence remain.
Checked: The J516s G15S row at caa8994 passed 38 checks and all 18 pinned CRCs. The forward merge leaves all six reviewed render-notifier and test paths unchanged, so that peer result carries forward. The older J773g row predates changes to four of those paths and still needs separate equivalence or a refreshed run.
|
J516s second-generation row, 30 Nov: PASS. 38/38 rows passed and 18/18 pinned CRCs matched, including compute.uber uniform M3 Pro J516s (T6030, G15S), 30 Nov 2026. Both arms used their own one-shot kernel and matching Staged Two-pass wall-time smoke measurements vs baseline: compute.light d16 +1.4%. Compute.uber uniform d4 was 139.82/124.50 µs vs 124.38/124.50 µs. Render.light tri d8/d16/d64 was −7.4%/−10.2%/−11.7%, postfx MSAA4 d2 −1.1%, D16 depth-only shadow d2 flat (723.60 → 723.59 µs), and mixed compute/render d4 −10.5%. The interleave row was rerun on both staged kernels after correcting its CLI arguments. Evidence on the controller is in |
|
J773g (M4 mini, T8132 G16G) target row at Setup
Not yet: held for a host-side trace. The row definition allows no repeatable regression over 1 %, and the D16 depth-only shadow loss below is repeatable. The cost is on the host side, so it gets traced on Linux next (the submit/command-record path on this head against main), fixed on the branch, and re-run as a matched ABBA, with D32F included. Where it comes from. A bounding build from this head returned only the render notifier mapping to uncached and kept the two stamp cells and the polling code. One boot each (main / this PR / bound):
|
|
Superseded by #3724, which caches only the FS record (plus the same-VM barrier change). Caching the TA record made render.shadow d16 3.8 % slower; it comes back as its own PR after the per-flight completion-event work. |
What: on the M4 (G16G, 26B123 firmware), map the render notifier records ASC-cached, as macOS does. This is the render half of #3285 and is stacked on it (base:
perf/g16-compute-notifier-cached); depends on #3285.The firmware reads and updates the render notifier records (TA and FS, one page) around every finished TA and FS pass. G16 mapped that page uncached, so every finished pass paid for uncached firmware loads and stores on the path between passes.
Tested: J773g (M4 Mac mini) at
d49f3e75952b(measured kit built froma94d58813752, same tree; only the commit message changed): render rows +4.6 to +9.2 % against #3285, render.shadow d16 depth-only d2 −3.2 %; CTS subset 9,639 pass / 0 fail; s2idle ok; 0 GPU faults, recoveries or hangs on 5 boots.761bc416, kernel tree =e9873471) vs this PR, both native warm builds on the J773g.15c5bb524162, gpubench-vk 13.render.light --mode procsd4,16 ×10: 20/20 ok.test-stamp-wrap.py(render stamps in the user-stamp cells, the cached page is never read) andtest-resources.py(the render page class) are updated. checkpatch --strict clean, no new rustfmt hunks.Risk: two-way door (a plain revert undoes it) · Macs on the g16 backend (M4; the M3 Pro/G15S and M3/G15G layouts share this render path)
Not yet:
Details
Evidence
perf/g16-m4-render-notifier-cached, headd49f3e75952bon drm/asahi: g16: map the compute notifier records ASC-cached #3285761bc41684049.7.3.0-ARCH-m4cpfix-e9873471; this PR =7.3.0-ARCH-m4kgp2-a94d5881(aurora.ko build-id1fd59b6f927f).