Skip to content

drm/asahi: g16: standby PB pool, WC scrub/write trims, inline submit, multi-flight render pipelining, and Wave 3 submit/retire wins - #2741

Merged
DjDeveloperr merged 21 commits into
mainfrom
djdev/g16-perf-272-pr
Nov 25, 2026
Merged

DjDeveloperr merged 21 commits into
mainfrom
djdev/g16-perf-272-pr

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What: G16 (M4) submit and render pipelining, stacked on #2676: a standby PB epoch pool, fewer same-VM WC scrubs and writes, inline ready submit, 8 render pass slots with per-slot scene lists, multi-flight same-VM render pipelining with fragment barriers, early fence signalling, COMPUTE_NO_QUERY_ACCESS, coalesced doorbells, and fixes for job retention, PB quarantine, scrub generation and the idle CLPC drain.
Tested: M4 Mac mini (J773g, G16G B0, 26B123) on earlier heads of this branch, not the current one: vk-mustpass-short 87/87, cross-VM stress, Minecraft 1080p, the 24-row gpubench-vk sweep, 314,336 GPU jobs with 0 recoveries; memory-leak gate flat on the stack tip of the time. Host tests 25/25.
Risk: two-way · M4 (J773g, J713)
Not yet: a row at the current head (the branch was rebuilt after the rows above); J713 idle/video power and a 10-minute sustained thermal run; CI, which runs once the base lands and this PR targets main.

Details (original description)

Summary

Ten-commit G16 (M4 / T8132, 26B123 firmware) GPU performance series stacked on djdev/g16-272 (#2676), with zero new knobs or debugfs/module parameters:

Waves 1–2 (commits 1–6)

  1. Standby PbEpoch pool: decouple standby PB epochs from per-job Prepared so consecutive renders reuse epochs without re-allocating.
  2. Selective same-VM WC scrubs + word-width WC reads: skip full TPC/tilemap scrubs on clean same-VM slot reuse while retaining full scrubs on first use, cross-VM switch, cancel, error, and recovery.
  3. Timed compute pipelining + expanded compute unit ring: pipeline timed compute commands without serializing behind previous timestamps.
  4. Inline ready submit + submitter-CPU completion worker + tighter poll cadence: publish ready work inline on the submit path and direct completion wakeups back to the submitter CPU.
  5. 8 render pass slots + per-slot scene_list + decoupled PB/UMA allocator slots: compact per-pass VA stride to 64 MiB (8 slots) and isolate scene_list per PassSlot (bisect-safe on its own with overlap still off).
  6. Multi-flight same-VM render pipelining + DRM_ASAHI_FEATURE_FRAGMENT_BARRIERS + deeper queues: enable TA(N)/FS(N-1) overlap via explicit hardware barriers, raise FLIGHTS/SCHEDULER_CREDITS to 32 and AHEAD_RECORDS to 128, restrict each logical queue's drm_sched workqueue to the creator cluster (matching g17/job.rs), and add lock-free syncobj_wait_hint().

Wave 3 (commits 7–10, hardware-verified on the J773g)

  1. Drop Shared::state across retire tail delay + early fence signalling: stop EP 0x20 trailing retries immediately once any flight retires (arming short_repoll only when active flights still retired nothing), release Shared::state and wake ready jobs before each 5 µs retry, and defer 1 ms housekeeping until after job::complete_all().
  2. DRM_ASAHI_FEATURE_COMPUTE_NO_QUERY_ACCESS: advertise and honor COMPUTE_NO_QUERY_ACCESS so ordinary compute dispatches pipeline behind timed compute work while query copy/reset shaders wait for host timestamp publication.
  3. Coalesced mailbox doorbells across multi-command publication batches: ring each touched firmware channel once per batch in Firmware::flush_doorbells() (preserving FS-before-TA ordering and fail-stopping on post-visibility doorbell error).
  4. Trim redundant WC writes for ComputeWork and render scene: write only the active ComputeWork spans (0..0x150 and 0x720..0xf08: 2,360 B vs 8,192 B, -71%) on clean same-VM reuse and populate only the active 2 KiB scene prefix (vs 16 KiB, -87.5%) per render pass.

Hardware Verification (Mac mini M4 J773g, macOS 27.2 / 26B123, 4K60 HDMI)

Tested on 7.3.0-ARCH-m4drv8 with aurora.ko carrying all 10 commits (Wave 1–3) + Mesa mesa-m4-mega-59b5202e (Borealis + G16G single-sample colour compression). Across the full boot (314,336 GPU jobs; 247,674 across the 24-row gpubench-vk sweep with tpc_clear_bytes=0, grouped=14,376, overlaps=202,661, reused=113,529 / fresh=3): 0 recoveries, 0 hang kills, 0 dmesg GPU errors, health: failed 0 degraded 0.

  • Vulkan CTS (vk-mustpass-short): 87/87 Pass (0 Fail, 0 Crash, 0 Timeout, 0 GPU errors).
  • Cross-VM & concurrent stress: 4-proc compute.light + concurrent 2-proc render.light + compute.heavy (compute_cross_vm=6,264, render_cross_vm=77) PASS, 0 recoveries, 0 errors.
  • Minecraft 1080p Fancy (rd=12, offscreen KWin Wayland, native GL): rc=0, 163.80 FPS (still 154.77 / spin 131.38 / fly 194.91 FPS, mean 6.105 ms, 8,191 frames, 0 GPU errors).

24-Row gpubench-vk vs Native macOS 27.2 (us/sub, lower is better; * = Linux beats/ties native macOS 27.2 — 7/24 rows)

Test / Params d Base W2b W3+Mega macOS 27.2 W3/macOS W3 gpu (µs) mac gpu (µs) Extra
render.light (tri) 1 425.2 320.9 305.3 262.1 1.16x 23.9 12.1
render.light (tri) 2 289.4 226.0 189.5 169.4 1.12x 24.2 9.9
render.light (tri) 4 292.4 167.9 171.6 104.5 1.64x 27.0 15.6
render.light (tri) 8 290.4 151.8 145.9 97.8 1.49x 21.7 16.4
render.light (tri) 16 293.4 149.6 142.5 94.8 1.50x 21.0 16.5
render.heavy (fill, 1080p) 1 836.1 726.7 585.5 554.3 1.06x 270.7 268.1
render.heavy (fill, 1080p) 2 708.2 414.6 312.9 252.5 1.24x 288.4 283.3
render.heavy (fill, 1080p) 4 698.3 414.6 296.6 248.0 1.20x 295.9 775.9
render.heavy (fill, 1080p) 8 700.3 437.1 307.9 248.0 1.24x 319.1 1760.6
render.heavy (fill, 1080p) 16 704.2 437.8 309.4 247.8 1.25x 320.2 3734.6
render.heavy (geom, 1080p) 1 925.9 833.3 728.9 757.6 0.96x * 415.8 432.2 +3.9% vs macOS
render.heavy (geom, 1080p) 4 809.1 390.6 323.4 259.9 1.24x 322.8 435.7
compute.light 1 310.9 227.5 228.1 159.2 1.43x 1.5 1.5
compute.light 4 93.7 84.8 79.7 39.6 2.01x 1.4 1.4
compute.light 8 79.6 67.8 71.3 34.1 2.09x 1.4 1.5
compute.light 16 89.2 63.1 60.6 32.4 1.87x 1.4 1.6
compute.heavy (alu) 1 929.4 844.6 833.3 827.8 1.01x 554.3 549.5 2577.0 vs 2594.2 GF/s
compute.heavy (alu) 4 566.9 556.8 555.6 540.0 1.03x 554.3 1079.4 3865.5 vs 3977.1 GF/s
compute.heavy (bw) 1 3048.8 2907.0 1592.4 1773.0 0.90x * 1260.5 1420.0 84.29 vs 75.70 GB/s (+11.3%)
compute.heavy (bw) 4 2631.6 2659.6 1282.1 1436.8 0.89x * 1279.6 2870.6 104.69 vs 93.42 GB/s (+12.1%)
copy.bw (fill) 1 1116.1 1041.7 905.8 1000.0 0.91x * 589.2 692.2 74.09 vs 67.11 GB/s (+10.4%)
copy.bw (fill) 4 737.5 739.6 620.3 696.4 0.89x * 621.8 1395.4 108.18 vs 96.37 GB/s (+12.3%)
copy.bw (buf2buf) 1 3048.8 2941.2 1592.4 1773.0 0.90x * 1264.2 1424.8 42.14 vs 37.85 GB/s (+11.3%)
copy.bw (buf2buf) 4 2659.6 2604.2 1282.1 1436.8 0.89x * 1283.3 2868.6 52.34 vs 46.71 GB/s (+12.1%)

Host Verification

  • python3 tools/testing/selftests/drivers/gpu/asahi-m4/run-host-tests.py: 24/24 PASS at Commit 5 alone (bisect verification) and at HEAD (all 10 commits).
  • scripts/checkpatch.pl --strict --git origin/djdev/g16-272..HEAD: 0 errors, 0 warnings, 0 checks across all 10 commits.

Keeping as draft pending the fanless M4 MacBook Air (J713) idle/video power + 10-minute sustained thermal row.

Rename the retained-session predicate to apple_pmp_t8132_retained_board()
and detect the retained T8132 PMP power-vote bridge from the device tree's
own `pmp` node (`apple,t8132-pmp-v2`, available, `apple,tunable-soc-device`
present) rather than gating on a board list, root SoC compatible, or OS
firmware version string. Keep apple_pmp_j713_board() as an inline alias
for existing callers.

Signed-off-by: Diljit Singh <[email protected]>
… and run to top p-state

Admit the J773g 25G83 firmware images, including the boot-filled B000
ranges zeroed before digest verification, and cover them in fwid.rs unit
tests.

Derive the firmware DVFS table row count (10-row 6-pair vs 11-row
5-pair+top) directly from the preserved ADT performance-state table
rather than gating on a board compatible, and let the utilization
governor, cooling ceiling, and reported p-state bound run up to the
board table's top state (S10 on 11-row tables).

Signed-off-by: Diljit Singh <[email protected]>
… PB heap, and close VM caches

Carry the G16 parameter-buffer and compute-pipelining updates needed
under the 26B123 runtime:
- unconditionally reuse a pass slot's retired PB epoch for the same VM
  and binding (no runtime toggle or mutable debugfs);
- keep compute commands in flight on dedicated per-unit UMA slots;
- share one 64 MiB PB heap per VM across render allocators, sizing the
  PB manager descriptor fields to the actual backed heap_blocks rather
  than hardcoding 256 MiB, and recycle never-exposed spare epochs;
- let closed VMs release arenas while slot leases retain only their own
  backing, and drain spare epochs in both Registry::prune() and
  Gpu::vm_closed() to break the Cache -> Arc<VmState> cycle;
- avoid redundant submit-path publication while a render is active.

Signed-off-by: Diljit Singh <[email protected]>
… idle power-off

Support the 26B123 G16 GPU firmware (also shipped in 26B131) while
leaving 25G83 byte-for-byte unchanged. Firmware selection keys strictly
on the boot loader's handoff fields and loaded TEXT digest, failing
closed on unknown builds.

Firmware layout, ABI, and ADT derivation:
- Add V25G83/V26B123 layout tables for InitData, device-control opcodes,
  queue info, and TA/FS/compute work records, with compile-time
  layout_fits() bounds and collision checks.
- Set POWER_PERFORMANCE +0xa4 = 1 (required power-up state selector)
  with no undocumented static InitData policy words.
- Derive 26B123 power sampling (+4/+8, +0x2b48/+0x2bbc/+0x2c10) and the
  average-power IIR filter (+0x29e4..+0x29f8) from /arm-io/sgx
  gpu-pwr-sample-period-aic-clks, CNTFRQ_EL0, and /arm-io/pmgr/clpc
  cpu-avg-limiter-input-tc; derive the low-peak (PPM) limiter filter and
  PI gains (+0xa80..+0xae0) from cpu-lowpeak-limiter-{input-tc,ki,kp}
  and gpu-power-sample-period (65536.0 PI integrator clamp at +0xaa8).
  Fail closed with EINVAL when any required ADT property is missing or 0.
- Read coredump-copy-buffer from /arm-io/gfx-asc/iop-gfx-nub in the
  preserved ADT to size InitData MAIN +0xfa8 and the 26B123 host
  crash-log buffer (failing closed when absent or invalid).

Start, idle power-off, and runtime:
- Admit 26B123 firmware-owned page tables and perform the PPL magic
  handshake, clearing handoff +8 before RUN and returning ETIMEDOUT if
  the firmware answer does not arrive.
- Start 26B123 without a PMP AGX vote (enabling GFXCAXI2AF and leaving
  loaded DATA to the firmware), hand over the host crash-log buffer
  before AP power-on, and run the standard boot NOP + IMPORT_GLOBALS +
  START sequence while accepting a pending InitData scheduler request.
- Publish the RETENTION table at RUNTIME +0x2c8 (leaving MAIN +0xfa0
  zero) so 26B123 can power the GPU down when idle, and guard all SGX
  MMIO reads/writes (engine busy/fault state, pstate(), and runtime
  set_generation()) inside Session::while_powered() under the PPL lock.
- Attempt all three Globals ceiling selectors without short-circuiting
  in floor_power() at fail-stop, drain all receive rings per pass, read
  the 26B123 queue-info busy flag at +0x54, read compute work ticks from
  compute::Layout::work_ticks with a tear-free hi/lo/hi loop, and check
  the session once per poll pass plus before publish_checked().

Signed-off-by: Diljit Singh <[email protected]>
… tests

Add check-abi-26b123.rs and test-abi-26b123.py to verify 26B123 layout
selection, compile-time policy collision guards, and exact byte-for-byte
InitData/work/queue encoding parity against independent per-field offset
tables.

Extend test-perf.py for ADT power-sampling, low-peak limiter, and
coredump-copy-buffer parsing; extend test-vm.py for 26B123 firmware page
tables, +8 clear before RUN, and ETIMEDOUT on missing magic answer; and
update the remaining host suites for the 26B123 ABI and compute work
tick layout.

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

Copy link
Copy Markdown
Contributor

Big wins on the J773g, and the 0 recoveries over 228k jobs is reassuring. A targeted adversarial read of fd755f1 (not every line of the 2k):

  • Scrub skipping is safe across processes. A slot skips the full scrub only when owner[k].id == vm_id, owner holds an Arc<VmState>, and VM ids come from the SequenceIDs counter (gpu.ids.vm.next()). So a slot's previous owner stays alive while it's recorded, and a new process can never inherit its id and its unscrubbed tilemap/heap. Error, cancel and recovery all force scrub_full. Good.

Things I'd like to see before this leaves draft:

  1. A MacBook Air row. Commit 4 extends the post-event trailing poll from 5 µs to 50 µs with 15 µs repolls, pins the completion worker high-priority on the submitter's CPU, and commit 6 pins each queue's drm_sched workqueue to the creator's cluster. On a fanless, battery-powered M4 Air (J713, same G16) those trade CPU wakeups and P-core residency for latency. All the numbers here are from a mains-powered mini with a fan. Two rows would settle it on the J713: (a) idle desktop and video-playback package power plus CPU wakeups/s, before and after; (b) a sustained 10-minute GPU load, with die temperature and the throttled clock at the end, before and after. If the trailing poll costs measurable idle power, it could be keyed on the queue actually having work in flight.
  2. Creator-cluster pinning. If the creating thread ran on an E-core (common for a compositor's setup thread), every later submit for that queue completes on the E-cluster. How does it behave when the creator's cluster is offlined or the creator migrates? A note on the fallback, or picking the cluster at submit time rather than queue creation, would cover it.
  3. Bisect safety of commit 5. It moves scene_list into the per-pass slot "to prevent TA/FS overlap corruption", but overlap is only enabled in commit 6. If 5 alone already changes the VA stride to 64 MiB with 8 pass slots, a one-line note that 5 is safe with overlap still off would help a future bisect.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr changed the title drm/asahi: g16: standby PB pool, selective WC scrubs, inline submit, and multi-flight render pipelining drm/asahi: g16: standby PB pool, WC scrub/write trims, inline submit, multi-flight render pipelining, and Wave 3 submit/retire wins Nov 21, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Thanks for the targeted adversarial read! Updated djdev/g16-perf-272-pr to 4bae96037 (10 commits, still Draft pending the fanless J713 Air row) with the review points addressed and Wave 3 (4 hardware-verified commits from dcp55) appended:

Review Points Addressed

  1. Trailing poll / short_repoll & MacBook Air row: Commit 7 (drop Shared::state across retire tail delay and signal fences early) now stops the EP 0x20 trailing retry loop immediately as soon as any flight retires (or flights drain) and arms short_repoll only when active flights still retired nothing after the trailing retries, releasing Shared::state and waking ready jobs before each 5 µs retry. Keeping this PR in Draft until we collect the requested fanless J713 Air rows (idle/video-playback package power + wakeups/s, and 10-min sustained GPU thermal/clock A/B).
  2. Creator-cluster pinning (g16/job.rs): Added a comment documenting the exact scope and fallback matching g17/job.rs: the restricted ordered workqueue handles only drm_sched run_job/free_job (actual completion signalling runs on Shared::complete_work queued to the per-submit submitter_cpu, not the queue's creation CPU), and apply_workqueue_attrs() on an unbound workqueue automatically falls back to wq_unbound_cpumask if the creator's cluster is offlined (while let _ = submit.restrict(...) fails soft to the default unbound mask on error).
  3. Bisect safety of Commit 5: Verified 24/24 asahi-m4 host tests pass at Commit 5 alone and documented in Commit 5's commit message that Order::ready() and Firmware::can_queue_behind() still serialize renders at depth 1 until Commit 6, so the compacted 64 MiB pass stride and per-PassSlot scene_list are bisect-safe with overlap still off.

Wave 3 dcp55 Hardware Verification (J773g, macOS 27.2 / 26B123, 4K60 HDMI)

  • Stability: 314,336 GPU jobs across the full boot (247,674 across the 24-row gpubench-vk sweep with tpc_clear_bytes=0, grouped=14,376, overlaps=202,661), 0 recoveries, 0 hang kills, 0 dmesg GPU errors.
  • Correctness: 87/87 vk-mustpass-short PASS; 4-proc compute.light + concurrent 2-proc render.light/compute.heavy cross-VM stress (compute_cross_vm=6,264, render_cross_vm=77) PASS.
  • Performance vs native macOS 27.2: Beats native macOS 27.2 on 7/24 gpubench-vk rows (all 6 BW/copy rows by +10.4–12.3%, plus render.heavy geom d=1 728.9 vs 757.6 µs, +3.9%); Minecraft 1080p Fancy native GL 163.80 FPS (rc=0, 0 errors). Full 24-row table is in the updated PR description.
  • Host checks: checkpatch.pl --strict 0/0/0 across all 10 commits; asahi-m4 host tests 24/24 PASS at Commit 5 and at 4bae96037.

Assisted-by: LLM (Gemini:4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at 4bae960. Commits 1-4 are unchanged from fd755f1. 5 and 6 differ only in the commit-message note and the job.rs comment.

Earlier points:

  1. Air power/thermal row: still open, as you said. Commit 7 makes the tail cheaper. It stops on the first retire and drops Shared::state across the 5 µs waits (poll.rs:409-422), and short_repoll now arms only when nothing retired. An event that retires nothing still costs up to 10 x 5 µs of udelay (poll.rs:47, poll.rs:144), and the high-priority submitter-CPU completion worker is unchanged. Also, with the lock dropped, POLL_WORK and FAST_POLL_WORK (mod.rs:268-288) can now both be in that tail at once. So the J713 rows (idle/video package power and wakeups/s; 10-minute sustained temperature and end clock, before and after) are still the thing to see, at this head.
  2. Creator-cluster pinning: the new comment answers it. Completion follows the per-submit CPU, and the restricted unbound workqueue falls back when its cluster goes offline. Fine.
  3. Commit-5 bisect note: done.

New commits:

  • Commit 10 trims the per-dispatch WC writes to 0..0x150 and 0x720..0xf08 of the compute work (fw/work/compute.rs:6-14), and to the first 0x800 bytes of the scene (fw/work.rs:214-217). On the host side I checked every encoder write against these spans for both V25G83 and V26B123 (25 register records, notifier, descriptor, 0xf00 tail, work_ticks, scene results at 0x600 and copy records up to 0x780), and they fit. What the trim newly relies on is that the firmware never writes into the gaps either, because clean same-VM reuse no longer re-zeroes them. A one-off debug readback over the gpubench sweep, showing the gaps still zero after retirement, would back the "only touches" claim. Nit: compute_needs_full_work() still has #[allow(dead_code)] although engine.rs:1547 uses it.
  • Commit 9: the publication-deadline return Err(ETIMEDOUT) inside the publish loop returns before flush_doorbells(). Records already posted earlier in the batch are then never rung. Every caller fail-stops on that error today (poll.rs:131-135, poll.rs:193-196), so nothing breaks. A comment there, or flushing before the return, would keep it from becoming a stranded-record bug if that error ever stops being fatal.
  • Commit 8 looks right to me. The flag is accepted in both validators, and the query_access hold in can_queue_behind() is limited to the same queue's timed predecessors.

Every row so far is from the J773g on 26B123. A functional run (vk-mustpass-short) on a J713 at this head would cover the Air's side of the same G16 code.

Assisted-by: LLM (Claude:Opus 5.5)

…ives a deep wake

The 26B123 POWER_PERFORMANCE layout inserts four u32s at +0x9c. G16
writes only +0xa4, the powered-up state selector. That is enough for a
cold boot, but not for the firmware's warm restart after a deep sleep:
on the J713 (M4 Air) the first deep wake ends with "GPU firmware back
in 691 us" and, 0.3 ms later, "RTKit: co-processor has crashed" in the
firmware's power-up path, before any client has submitted work. The GPU
is gone until reboot.

macOS 27.2 sets all four words to 1, and so did this driver before the
26B123 layout was reworked. Write +0x9c, +0xa0 and +0xa8 again, next to
+0xa4. The words belong to the 26B123 layout, so they are selected by
the firmware ABI, as before; 25G83 is unchanged.

On the J713 (macOS 27.2 firmware, default kernel command line) with
the external monitor and the USB4 peer attached: 3 of 3 deep sleeps
wake with the GPU alive, with vkmark running across the first sleep,
then dEQP-VK smoke and glmark2 after the wakes. Without the change the
same kernel crashed on the first wake. The host tests and the 26B123
offset oracle are updated for the three words.

Signed-off-by: Ryan Murray <[email protected]>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Updated djdev/g16-perf-272-pr at 65a87c442d997 for the two code comments on Commits 9–10:

  • Commit 9 (drivers/gpu/drm/asahi/g16/engine.rs): defensively flush pending_rings before return Err(ETIMEDOUT) in publish_checked() with a comment noting self.engine.flights.is_empty() already implies pending_rings == 0 today, preventing stranded records if the error ever stops being fatal.
  • Commit 10 (drivers/gpu/drm/asahi/g16/slots.rs): removed the unused #[allow(dead_code)] on compute_needs_full_work().

Host verification: asahi-m4/run-host-tests.py 24/24 PASS; checkpatch.pl --strict 0/0/0.

Remaining open items tracked for next runs:

  • One-off gap-zero readback verification on J773g across the gpubench-vk sweep for Commit 10.
  • J713 M4 Air power/thermal (idle/video power + wakeups/s + 10-min sustained) and vk-mustpass-short rows at this head (requesting on J713).

Assisted-by: LLM (Gemini:4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at 65a87c4. Commits 1-8 are unchanged from 4bae960.

  • Commit 9: fixed. publish_checked() now flushes pending_rings before return Err(ETIMEDOUT) (g16/engine.rs:929-937), and the comment matches the code: that arm only runs when no flight is in flight.
  • Commit 10: the #[allow(dead_code)] is gone. The gap-zero readback is still owed. The trim relies on the firmware never writing the unwritten spans of the compute work and the scene.
  • Still owed at this head, as you noted: on a J713, idle and video package power with CPU wakeups/s, and a 10-minute sustained GPU load with die temperature and end clock, both before and after; plus a vk-mustpass-short run. The trailing 5 µs repolls on events that retire nothing are what those power numbers would show.

No new issues.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

A non-author adversarial pass over the whole stack at its tip, 1b85b1e. It looks at lifetime, concurrency, firmware-shared memory and accounting. It does not repeat the earlier rounds on this PR. Findings are listed under the PR whose commit introduced them, and line numbers are at 1b85b1e. Two reviewers traced the first item independently and reached the same result.

1. Scheduler::last_job keeps the queue's last job alive, so a VM's deferred GEM closes never drain (d915ca0).
g16/job.rs:641 holds a strong Arc<Job> and replaces it only at the next push() (:682, :693). The Job owns its VmJobGuard through _guard: Deferred<MappingGuard> (job.rs:119, :169), so the VM's lifetime.state.active count is at least 1 for as long as the queue exists:

  • each SUBMIT takes the new job's guard (queue.rs:215, retain_first_job) before push() replaces the old job (queue.rs:257), so the count never returns to 0;
  • Vm::drop_mappings() (mmu/lifetime.rs:631-657) therefore always takes the state.active != 0 branch and only queues the closed object;
  • the drain in VmJobGuard::drop (lifetime.rs:694-733) never runs.

Consequence: a BO that userspace closes while still mapped (userspace frees BOs by GEM close and relies on it to unmap) stays pinned until the queue is destroyed. A long-lived G16 context that keeps allocating and freeing BOs (compositor, browser) grows without bound. G15, G17 and M3 have no last_job. Suggested hardware check: submit once, then create, bind and close large BOs in a loop without destroying the queue, and watch fdinfo drm-total-memory / drm-resident-*. A fix direction is to keep a weak or started-flag-only reference, or to release the predecessor once it has started.

2. The same retained job inflates active_render_passes, so every rendering VM grows extension tiers (root cause d915ca0; visible since c4e5905 in #2787 and f6f17f0 in #2826).
Cache::prepare adds the job's passes (resources.rs:800-803); the only decrement is Prepared::drop (:838-849). Because of item 1, the previous job's Prepared is still alive at every prepare(). As a result, target_render_slots (resources.rs:157-198) sees active_passes != 0 and reads it as an overlap with an in-flight render. A model built from a verbatim copy of target_render_slots, driving a 60 Hz client with one render per SUBMIT and the previous frame fully retired, gives these backed pass slots after 4 frames:

  • no pinned job: 2;
  • last job pinned: 8;
  • last job with 7 passes: 18;
  • two queues with 12+12 passes: 32.

This means "steady single-pass clients stay on the two base slots" (the code comment at resources.rs:150-156 and the #2787/#2826 replies) does not hold on a running system: Tier 0 (+21.56 MiB) appears on the second render SUBMIT and stays for the VM's lifetime. The host unit test passes because it calls the pure function with active_passes = 0. Fixing item 1 fixes this too; independently, the count could be released at flight retirement rather than at Prepared::drop.

3. An aborted render on a fresh PB epoch frees that epoch when the flight drops (43952f8).
Since the standby pool, a fresh epoch's only owner is Flight::pb (engine.rs:317, set at :2395, taken at :1479). On Retirement::Aborted, retire_oldest (poll.rs:1239-1253) quarantines the PB slot and the pass slots and retains the job, but never stores f.pb. When f goes out of scope, the Deferred<PbEpochInner> (pools.rs:602-624) unmaps the manager, block list, ring, counter and InitBM records and frees them. Their firmware VA is then free for a later private arena of any VM.

This contradicts mod.rs:13-14 ("Everything firmware-visible that a failed command may still reference is retained until reboot"). It affects the first render of a VM, the first after a cross-VM switch, and any first render after an earlier recovery (Pools::invalidate() clears keep). The fail-stop early returns in retire_oldest (poll.rs:1184-1194, 1210-1214, 1224-1232, 1261-1269) drop f.pb/f.claims the same way, while fail_flights deliberately mem::forgets them. The unproven link is whether 26B123 ever touches the PB manager of an aborted, never-reused parameter id again; your hang rows show no fault afterwards. Suggested fix: park the epoch with the quarantined slot (for example owners[k] = f.pb.take() in quarantine_flight), and forget the flight on the fail-stop returns.

4. A slot that is in flight across a recovery loses the forced full scrub (dc5c24e + 5607d21).
recover() calls slots.invalidate_scrub() to force a full scrub on the next claim (recovery.rs:432-436). A flight already in flight that then retires Full and Ok goes through Slots::retire, which clears scrub_full[k] for its units and passes (slots.rs:1310, 1316). The next same-VM claim then takes the partial-write path. The PB side handles this case explicitly (Pools::invalidate() bumps binds, so retire_epoch refuses reuse); the slots have no equivalent. A per-flight recovery generation would close it. This is low severity: whether firmware leaves anything in an unaffected command's scratch during recovery is unproven.

5. CLPC work hint is not cleared on drain (d915ca0; the 1cad4da hold in #2787 builds on it).
report_work() has one caller, the end of publish_checked() (engine.rs:1188). poll_step() calls publish_checked() only while engine.pending is non-empty (poll.rs:540-555). When the last flight of a burst retires with nothing pending, report_work(false) never runs:

  • ClpcHold::idle_since stays None, so expire() (power/policy.rs:156-160) cannot fire;
  • the memory/fabric floor stays raised until the next publish pass that happens to end with no flights, or until system sleep or fail-stop (sleep.rs:211, recovery.rs:348).

On a fanless M4 Air this would be idle power. A J713 idle-draw row after a short burst, compared with one after a fresh boot, would show it.

Low, same-VM stall only: Cache::prepare() holds the per-VM ready mutex across the 10 s standby wait (resources.rs:586 to :799, wait loop :702-753; 43952f8 + 752c66d). Other SUBMITs and Cache::close() of the same VM block, non-interruptibly, behind it.

Method and evidence
  • Read-only review of drivers/gpu/drm/asahi/g16, file.rs, mmu.rs and mmu/lifetime.rs at 1b85b1e, with every finding attributed by blame. No hardware run.
  • Asahi-m4 host suite at 1b85b1e: 25/25 pass, so none of the above is caught by the current host tests.
  • The item 2 model is a standalone Rust copy of target_render_slots driven by a frame loop.
  • Checked and found sound: no double retire (all flight removal under Shared::state on the inline, poll and fail-stop paths); fences signalled at most once (CompletionLink::queued, the Progress::signaled swap, Timeline::complete), in queue order across the off-lock batch; commit_render balanced on error paths; no lock-order inversion; GFP_NOWAIT or preallocated allocations under the device lock; dropping Shared::state across the retire tail (2920f7f) leaves no stale invariant; no lost wakeup or livelock in slot-wait/scrub; 48-slot masks are all u64.

Assisted-by: LLM (Claude:Opus 5.5)

…ar idle phase-0 notices

Defer recovery storm admission, pool invalidation, stage snapshot capture,
and fault_scan() until firmware actually halts in phase 1 inside
MarkAndAcknowledge, instead of running them before the phase loop while
firmware may still be executing on phase 0.

Also dismiss trailing type-4/0x16 recovery notifications when phase stays
at 0 with no flights in flight for 50 ms (PHANTOM_PHASE0_WAIT_NS), so a
late notification drained after Resume does not spin for the full 1000 ms
recovery budget and fail-stop the GPU.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

@RyanTheTide Rebased djdev/g16-perf-272-pr onto updated #2676 (8f43a11cb715) and pushed ba6a7bef1ea380784f859758ac832eb98538165d (11 commits) addressing every review item in ba6a7bef1ea3:

Point-by-point fixes (ba6a7bef1ea3)

  1. Scheduler::last_job GEM/shmem retention leak: stopped retaining Arc<Job> in Scheduler::last_job, releasing completed job/GEM/VM references immediately upon retirement.
  2. active_render_passes tier inflation: fixed pass-count tracking so tier growth reflects actual live render passes rather than inflating monotonically.
  3. Aborted fresh PB epoch quarantine: quarantined newly allocated PB epochs that abort before first retirement instead of returning them to the standby pool.
  4. scrub_gen across recovery: preserved/bumped scrub_gen across firmware recovery so displaced slots cannot skip scrubbing after recovery.
  5. Idle CLPC drain & standby wait lock hygiene: called power.report_work(false) on drain so CLPC returns cleanly to idle, and dropped Cache::ready before waiting on standby pool allocation.
    (Note: per-DRM-file fdinfo union via Client::add_union() lands on top of this stack in #2852 44dd25507c01.)

Verification

  • Host tests: asahi-m4/run-host-tests.py (25/25 PASS at stack tip 44dd25507c01); scripts/checkpatch.pl --no-signoff — 0 errors, 0 warnings.
  • Live Apple M4 (G16G B0, J773g Mac mini, 7.3.0-ARCH-m4prod25d, dcp99-v25d-verify):
    • P0 Memory Leak Gate (133,905 GPU jobs, 60,081 -> 193,986 + 30 s idle soak): SUnreclaim 75,696 -> 76,592 -> 76,592 kB (flat across soak), MemAvailable 20,513,872 -> 19,680,080 -> 20,503,664 kB, vm_bindings: live 11 handles 9 (0 delta), drm_resident_kib 2,468,208 -> 2,370,288 -> 2,370,288 KiB, pb.bad=0, recoveries=0.
    • Final postflight: FULL_BOOT_KERNEL_BUGS=0, FULL_BOOT_GPU_DMESG_ERRS=0, TOTAL_RECOVERIES_PLUS_HANG_KILLS=0, PB_BAD=0, jobs 197974 job_cmds 243961, POST_IDLE=IDLE_CLEAN.

Assisted-by: LLM (Gemini:4 Neon)

Live macOS 27.2 (26B123) InitData captures on J773g write 1 at MAIN
(HW data) +0x277e, an unaligned u32 that 26B123 adds and that we left
at zero.

With it at zero, long single-dispatch compute shaders (compute.long,
more than ~500 ms per workgroup) were falsely reported as stalled and
the firmware started GPU recovery (event=[4, 0, 0, 0xf],
stats[0]=0x16), as measured on J773g. Write 1 there, as macOS does.

Add Layout::main_policy with compile-time disjointness validation in
layout_fits(), set MAIN +0x277e = 1 on V26B123, and update the
asahi-m4 host ABI and golden tests accordingly.

Signed-off-by: Diljit Singh <[email protected]>
Previously Cache::prepare() popped a spare PbEpoch (cap 4) or allocated
and UAT-mapped a fresh 80 KiB PbEpoch for every queued render job, only
for almost every render to reuse the slot's existing epoch and discard
the unused epoch on drop once submission depth exceeded 4.

Keep a shared per-VM standby pool in Cache::standby guarded by
SpinLockIrq with the invariant epochs.len() >= reserved for all accepted
unpublished render commands. Cache::prepare() tops up only the deficit
in SUBMIT ioctl context before any fence exists, waiting interruptibly
on a CondVar for standby headroom during bursts instead of failing with
E2BIG (matching Budget::reserve's 10-second administrative bound) and
retrying if a concurrent InitBM pops an epoch before commit.

Steady-state queued renders at any depth allocate zero PbEpochs and
perform zero UAT mappings or window syncs. Fresh InitBM publications
draw from standby under the device lock without allocating, unpublished
rollbacks return the unexposed epoch, and Cache::close() drops surplus
epochs immediately while retaining only reserved epochs until accepted
jobs drain.

Signed-off-by: Diljit Singh <[email protected]>
…C reads

Previously every compute dispatch zeroed 288.8 KiB of write-combined
memory (256 KiB context_store, 16 KiB aux, 16 KiB preempt, unused seq,
and 16 B its) and read back the 160-byte UMA descriptor byte by byte
with read_volatile(). Every render pass zeroed ~530 KiB to >1 MiB of
WC memory (including dead-code ta_scratch/fs_scratch, work/seq images
immediately overwritten by prefix_render(), aux, scene_user, full 48 KiB
preemption buffers, and tpc_dirty) synchronously under Shared::state.

Track per-slot full-scrub necessity in Slots:
- First use, cross-VM switch, cancelled preparation, affected error
  receipts, and firmware recovery (invalidate_scrub) perform the full
  scrub so no client or faulted state can ever leak.
- Clean same-VM compute reuse zeroes only the 16-byte internal timestamp
  pair (its).
- Clean same-VM render reuse zeroes only its (32 B), active heap header
  (4 KiB), tilemap_dirty, and active preemption record headers (2 KiB),
  preserving the tpc_dirty high-water mark until the next full scrub.
- Upgrade FwObject::read() to 64-bit volatile word loads for aligned
  spans, reducing compute descriptor WC bus reads by 8x.

Signed-off-by: Diljit Singh <[email protected]>
…it ring

can_queue_behind() previously refused to pipeline behind any in-flight
compute command carrying timestamp_outputs, forcing depth-4+ timed
compute workloads down to depth-1 serialization. Each compute flight
already owns its own private ComputeSlot (its/work), and retire_oldest()
publishes timestamps in FIFO publication order before signalling the
flight's fence, so timed same-VM compute commands can pipeline freely.

Expand hw::sizes::COMPUTE_UNITS and params::compute_units() from 8/6 to
16 (placing extension units at 0x7080000000..0x70b8000000, clear of the
0x7040000000..0x7080000000 dynamic PB page-list aperture and below
PB_HEAP at 0x70c0000000, using hardware UMA slots 1..=16). With
displacement lifetime tracking, 16 units sustain up to 15 in-flight
compute commands per bursting VM instead of 5.

Signed-off-by: Diljit Singh <[email protected]>
…en poll cadence

Eliminate four layers of host-side latency on the G16 submit/completion
round trip while preserving sleep-transition safety:

1. Direct inline submit from SUBMIT ioctl: when the previous job on the
   logical queue has already started, all input fences are signalled,
   and Shared::state is uncontended (try_lock), Scheduler::push()
   publishes immediately on the submitting CPU before pushing to
   drm_sched (whose subsequent run() observes started == true as a
   no-op while preserving credits, fence ownership, and QUEUE_DESTROY
   drain semantics). Contended or dependency-blocked jobs fall back to
   drm_sched in strict queue order.
2. Submitter-pinned dedicated completion worker: replace WORK_CPU_UNBOUND
   on system_highpri_wq for EP 0x20 / hrtimer wakeups with a per-CPU
   high-priority reclaim OwnedQueue (aurora_g16_events) enqueued on the
   last submitting CPU, keeping WC receipt reads and fence wakeups hot
   on the submitting core; join cleanly in sleep::join_workers().
3. Tighten post-event retirement tail: extend post-EP-0x20 trailing
   5 us polls from 4 (20 us) to 10 (50 us) to absorb firmware's WC
   receipt tail without falling into a 100 us resnap hrtimer sleep, and
   rearm at repoll_us (15 us) if an evented flight is still settling.
4. Split fast completion drain from 1 ms housekeeping and stop hrtimer /
   delayed-work thrash: throttle power-governor updates, host-window
   health checks, full Session::check(), and administrative hang checks
   to 1 ms cadence while keeping transport checks, ring drains, and
   recovery/fault checks immediate; avoid cancelling/reprogramming the
   hrtimer or re-arming the 1-jiffy backup when a sufficient timer is
   already armed. Guard run_poll(), submit_locked(), and
   try_submit_inline() with lock-held sleeping.load(Ordering::Acquire)
   checks so suspend never races inline or polled publication.

Signed-off-by: Diljit Singh <[email protected]>
…d decouple PB/UMA slots

Compact the per-pass render VA layout from 256 MiB to 64 MiB stride
within 0x7020000000..0x7040000000 (verified by compile-time overlap
assertions), expanding RENDER_SLOTS from 2 to 8, and move scene_list
(0x4000 bytes) from the shared per-allocator Allocator into per-pass
PassSlot (client VA client::SCENE_LIST + i * PASS_STRIDE, 0x7020180000).
Giving each PassSlot its own scene_list matches G15's per-pass storage
and prevents TA(N)/FS(N-1) overlap corruption when render pipelining is
enabled.

This commit is bisect-safe on its own with render overlap still off:
Order::ready() and Firmware::can_queue_behind() still serialize renders
at depth 1 until the following commit, so the compacted 64 MiB pass
stride and per-PassSlot scene_list run cleanly under single-flight
render execution.

Keep base RenderArena at 2 pass slots for single-pass or light VMs and
lazily allocate extension pass slots 2..8 in RenderExtArena on render
bursts (mirroring compute_ext). Box RenderOwners in Slots alongside
ComputeOwners and switch its displacement ledger to pipelined mode
(Lifetime::<8>::new(true)), keeping up to 7 concurrent passes in flight.

Decouple the two device-wide PB/UMA allocator slots (parameter_id 0/1,
hardware UMA slot 33) from PassSlot index 0..8: same-VM renders stay on
their active reusable allocator slot with cumulative uma_submitted
tracking (PoolSet::prepare_in_flight / retired_at), while cross-VM
switches and post-recovery/error renders drain and switch to the
displaced alternate slot. Aborted receipts permanently quarantine the
affected allocator slot and retain its VM and arena leases. Check
Pools::exhausted(), per-VM Pools::exhausted_for(), and
Slots::render_exhausted_within() in publish_checked() so blocked render
VMs cancel immediately with ECANCELED instead of spinning on EAGAIN and
stalling unrelated compute.

Signed-off-by: Diljit Singh <[email protected]>
…nt barriers, and deeper queues

Lift depth-1 render serialization so same-VM renders pipeline across
PassSlot 0..RENDER_SLOTS while sharing the active exposed PB/UMA
allocator slot, and remove remaining host-side queue-depth and
wakeup-placement caps:

- Allow same-engine render orders in Order::ready() to follow the
  queue's published render frontier while keeping cross-engine
  dependencies gated on full completion.
- Extend Firmware::can_queue_behind() to admit healthy same-VM renders
  behind in-flight non-InitBM renders of the same VM (up to
  params::render_flights() = RENDER_SLOTS - 1), while still draining
  across VM switches, cross-engine transitions, InitBM priming renders,
  and error/recovery paths.
- Emit explicit TA/FS hardware barriers in prefix_render() for queued
  renders: fragment-only or barrier-free renders overlap TA(N) with
  FS(N-1) (advertising DRM_ASAHI_FEATURE_FRAGMENT_BARRIERS); full
  render barriers hold TA(N) on FS(N-1) in hardware.
- Remove the render_busy skip in Shared::submit_locked() so queued
  renders publish immediately on submit, and extend queue_passed() and
  retired_snapshot() for in-order passed receipts across Channel::Ta,
  Channel::Fs, shared notifier stamps, and cumulative PoolSet::retired_at()
  UMA completion.
- Bound clean same-VM tilemap scrubbing in Slots::claim_pass_in() to
  tilemap_dirty.min(current_tilemap_bytes) while retaining the high-water
  mark for larger subsequent passes and cross-VM/recovery full scrubs.
- Raise FLIGHTS (16 -> 32), SCHEDULER_CREDITS (16 -> 32), AHEAD_RECORDS
  (64 -> 128), and params::compute_flights() (16 -> 32), give each
  logical queue's drm_sched a creator-cluster-restricted ordered
  reclaimable workqueue, and implement gpu::Gpu::syncobj_wait_hint()
  with a lock-free active-burst uclamp hint (matching G17).

Signed-off-by: Diljit Singh <[email protected]>
…l fences early

Firmware::retire() previously ran up to EVENT_RETIRE_POLLS (10) x 5 us
udelay() loops while holding Shared::state whenever flights remained
non-empty after an EP 0x20 interrupt. At queue depth d > 1, retiring the
oldest flight left subsequent flights in self.engine.flights, causing
every EP 0x20 interrupt to spin for 50 us under Shared::state (bouncing
concurrent try_submit_inline() submissions onto drm_sched) and to arm a
15 us short_repoll hrtimer even though retirement had succeeded.
Periodic 1 ms housekeeping also ran before retiring and signalling
completed fences.

Split polling into a non-sleeping Firmware::poll_step() and
Firmware::retire_once() that report whether any flight retired:

- Stop the EP 0x20 trailing retry loop immediately as soon as any flight
  retires (or flights drain, a receipt fault occurs, or the engine
  freezes/fails), and set short_repoll only when an event with active
  flights still retired nothing after the trailing retries.
- Release Shared::state and complete any ready jobs before each 5 us
  udelay() retry so concurrent inline submissions can acquire the lock
  without contention.
- Retire and publish ready work before periodic 1 ms housekeeping,
  deferring housekeeping until after job::complete_all() wakes userspace
  whenever jobs retired on that pass.

Signed-off-by: Diljit Singh <[email protected]>
Advertise DRM_ASAHI_FEATURE_COMPUTE_NO_QUERY_ACCESS in G16 GET_PARAMS
and accept DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS in compute stream/command
validation.

G16 publishes command timestamp outputs from the CPU during
retire_oldest(). Record on each Flight whether it carries timestamp
outputs and, in Firmware::can_queue_behind(), hold a same-queue compute
command with a compute barrier behind an in-flight timed predecessor
unless DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS is set (clearing
ComputeCommand::query_access). Ordinary compute dispatches that pass
NO_QUERY_ACCESS continue to pipeline freely behind timed compute work,
while query copy/reset compute shaders wait for host timestamp
publication.

Extend test-command-stream.py and test-publication.py with host coverage
for the compute flag and query-access pipelining rules.

Signed-off-by: Diljit Singh <[email protected]>
…cation batches

When publish_checked() publishes multiple commands in a single pass
(multi-command SUBMITs or queued back-to-back submissions), each command
still posts its own SubmitRecord and advances qstate::WRITE individually
per the M4 firmware contract, but previously called session.ring(channel)
on every iteration.

Defer doorbell ringing into a per-batch channel bitmask and ring each
touched channel once via Firmware::flush_doorbells() after the batch
loop finishes (preserving FS-before-TA ordering for render batches and
fail-stopping on any post-visibility doorbell error). Count commands
that share a coalesced doorbell pass in Engine::stats.grouped.

Add host tests in test-publication.py covering coalesced compute/render
doorbells, deferred-follower flushing, and doorbell error fail-stop.

Signed-off-by: Diljit Singh <[email protected]>
…scene

Every G16 compute dispatch previously copied the full 8 KiB ComputeWork
object (0x2000 bytes) into write-combined firmware memory, even though
encode_compute_for() and the firmware only touch 0x000..0x150 (header
plus up to 25 register records) and 0x720..0xf08 (metadata, ABI fields,
embedded sequence, notifier, UMA descriptor, tail) — leaving 5,832 bytes
(71%) perpetually zero. Similarly, every render pass zeroed and copied
the full 16 KiB scene object (0x4000 bytes) to WC memory even though
only 0x000..0x780 (rounded up to 0x800, 2 KiB) is touched by host or
firmware.

- Track on ComputeOwners whether each unit's latest claim required a
  full scrub (first use, cross-VM switch, cancelled prep, error, or
  firmware recovery). On clean same-VM reuse, prefix_compute() writes
  only the two active spans (0..0x150 and 0x720..0xf08: 2,360 bytes
  instead of 8,192 bytes); full-scrub claims still write all 0x2000
  bytes after preserving any existing UMA descriptor.
- Zero the full 16 KiB PassSlot::scene in PassSlot::scrub(full = true),
  size Scratch::scene to scene::ACTIVE_SIZE (0x800), and allow
  fill_scene() to zero and populate that active 2 KiB prefix, cutting
  14,336 bytes (87.5%) of CPU memset and WC writes per render pass.
- Extend test-resources.py to verify compute_needs_full_work() state
  transitions and PassSlot::scene full-scrub coverage.

Signed-off-by: Diljit Singh <[email protected]>
… and idle CLPC drain

Address review findings on PR #2741:

- Replace Scheduler::last_job (Option<Arc<Job>>) with a lightweight
  last_scheduled: Option<Arc<AtomicBool>> signalled after SchedJob::run(),
  cancel() or drop() finishes handing off the job. Queue-local inline
  submission ordering is preserved without pinning the previous Arc<Job>
  (and its VmJobGuard / Prepared arenas) across idle periods or subsequent
  submissions.
- Retain the aborted flight's fresh PbEpoch in Pools::quarantine_flight()
  alongside the prior slot owner, and mem::forget() the removed Flight on
  fail-stop early returns in retire_oldest() so exposed epochs are never
  unmapped while firmware may still reference them.
- Track a monotonic scrub_gen across Slots::invalidate_scrub() and stamp
  it on Claims during Slots::publish() so flights that were already in
  flight across a firmware recovery do not clear scrub_full on retirement.
- Report idle work state to CLPC (power.report_work(false)) in poll_step()
  when flights drain with an empty pending queue.
- Drop Cache::ready before the up-to-10 s standby wait in Cache::prepare()
  so Cache::close() and same-VM compute submits do not block behind a
  render standby wait.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr marked this pull request as ready for review November 24, 2026 07:49
Bring in CONFIG_DRM_ASAHI_G14_V27_2, which the hardware-defaults host
test requires the shared asahi.config to enable.

Signed-off-by: Diljit Singh <[email protected]>
Bring in integration/aurora through the updated base. The only conflict
is the g16/params.rs module comment: it now lists VDM_USC_INVALIDATE
from the shared file.rs together with the fragment-only render barriers
and COMPUTE_NO_QUERY_ACCESS this series advertises.

Signed-off-by: Diljit Singh <[email protected]>
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Merge readiness at 674d1bc2: not ready yet

Check Detail
CI at head ok no CI for this change (the hardware row is the gate)
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 674d1bc2, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · M4 (J773g, J713)

Areas: area:gpu, area:platform

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

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Verdict at 674d1bc2995e: FINISH, then merge. No code blockers.

Blockers:

  1. No hardware row at this head. Every row in this PR ran a commit that is no longer in the branch, because the branch was rebuilt onto the updated base. Fix: one J773g run at this head, or on a candidate that contains this head unchanged (see below).

Checked: this PR's own commits against its base; no Apple material in code or commit messages; no chip or board gates; no new parameters (g16_repoll_us already exists on main); only bounded waits; commits carry the author and Signed-off-by, no AI attribution; CI does not run on a stacked base and will run once this PR targets main. The fixes for the last review round (job retention, tier inflation, PB quarantine, scrub generation, idle CLPC drain) are in 9f14889356cd. I reformatted the PR body to What / Tested / Risk / Not yet, with the original kept folded and its attribution line removed.

Row

One J773g run on a candidate that contains the heads of #3087, #3057 and #3046 unchanged (boot, idle/wake, deep sleep, vk-mustpass-short, gpubench vk-full, compute.long, 0 GPU faults) counts for every non-draft PR in this stack at once.

@DjDeveloperr
DjDeveloperr changed the base branch from djdev/g16-272 to main November 24, 2026 19:07
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 24, 2026 19:07
@github-actions github-actions Bot added the area:platform Area from CODEOWNERS (bot) label Nov 24, 2026
@DjDeveloperr
DjDeveloperr merged commit 1e0b2db into main Nov 25, 2026
2 checks passed
@RyanTheTide
RyanTheTide deleted the djdev/g16-perf-272-pr branch November 27, 2026 13:21
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) area:platform Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (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