Skip to content

drm/asahi: g16: reuse a pass slot's retired PB epoch - #1543

Merged
DjDeveloperr merged 3 commits into
aurora-silicon:mainfrom
aeries0x:j604-pb-pr-r4
Nov 25, 2026
Merged

DjDeveloperr merged 3 commits into
aurora-silicon:mainfrom
aeries0x:j604-pb-pr-r4

Conversation

@aeries0x

@aeries0x aeries0x commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

Reuse a G16 pass slot's retired parameter buffer (PB) epoch for the same VM without a reseed or InitBM, and invalidate pass slots on firmware recovery and deep-sleep firmware restart (sleep_restart()).

PR #2676 (0fb26972a7d6 and 02370c0d89cd) landed the PB epoch reuse logic, pool/recovery handling, and test-resources.py unit test on main. Merging main (dff34de7c681) into this branch keeps main's current G16 engine, pools, phase-1 recovery invalidation, and selftest intact; the remaining net diff against main is self.pools.invalidate() in drivers/gpu/drm/asahi/g16/sleep.rs::sleep_restart() (so the first render on each pass slot after a deep-sleep firmware restart starts fresh with InitBM) plus the three matching doc comments in drivers/gpu/drm/asahi/g16/pools.rs.

Tested

Tested: MacBook Pro 14" M4 (J604, T8132, GPU firmware 25G83) at bca99aa2ee3f: clean boot (0 failed units, 0 new kernel errors, 0 GPU faults or recoveries, 352,620 GPU jobs / 393,761 commands, pb: reused 127642 fresh 1218 bad 0, pipeline: behind 138596 max_flights 5), gpubench-vk render.light 255 / 207 / 204 us/submit (depth 1/8/64), compute.light 205 / 73 us/submit (depth 1/8), gpubench-stress-vk --all 12 pass / 0 fail / 5 skip, glmark2-es2-drm --off-screen build 1355 fps / shading 1328 fps (score 1340).

CI container checks (tools/asahi/run-host-tests.py): 491/532 passed on head and on base dff34de7c681 (asahi-m4 pass, 0 regressions); scripts/checkpatch.pl --strict 0 errors / 0 warnings; drivers/gpu/drm/asahi/aurora.o (LLVM=1) builds with 0 warnings.

Risk

Risk: two-way · G16 (M4 / T8132) Macs. A plain revert removes the sleep_restart() pool invalidation; the PB epoch reuse itself is already on main via #2676.

Not yet

  • Deep-sleep wake (PM_SUSPEND_MEM / sleep_restart()) is not reachable on J604 today because sleep-controller@380700000 is disabled in t8132-j604.dts; Pools::invalidate() is covered by test-resources.py (pb_reuse_needs_the_same_binding_vm_and_a_completed_render_and_holds_nothing), and a deep-sleep wake run on a deep-sleep-enabled T8132 Mac (such as J773g or J713) has not been executed on this head.
Original design notes and earlier J604 A/B comparison (pre-#2676)

Every G16 render originally got a fresh parameter buffer (PB) epoch at SUBMIT and an InitBM ahead of its TA work, so the firmware rebuilt the allocator state for every render. Reusing the slot's owner epoch instead cut a small triangle render at queue depth 1 on a base M4 MacBook Pro (J604) from 1121 to 492 us.

The reused epoch is the slot's existing owner lease, tracked by a binding counter (binds: [u64; 2]) and keep: [bool; 2] rather than an extra reference, so no epoch, VM, or admission permit lives longer than it does without reuse. After another VM's render on the slot, a failed or aborted render, firmware recovery, or a deep-sleep firmware restart (sleep_restart()), the next render on the slot starts fresh.

Earlier same-machine A/B comparison on J604 (GPU firmware 25G83, integration/aurora 673f618425, gpubench core-a Vulkan, performance profile, median us/submit across two boots per setting):

Test g16_pb_reuse=0 =1
render.light tri, depth 1 1121 / 1131 492 / 495
render.light tri, depth 8 984 / 909 312 / 318
render.light tri, depth 64 940 / 912 302 / 329
render.light clear, depth 1 330 / 260 267 / 326
compute.light, depth 1 263 / 263 267 / 263
  • Error-path fault injection (local only, not part of this PR): 1699 injected failed-retirements and 86 deferred fresh bindings each followed by a fresh epoch with InitBM (0 reuses); 1786 deferred reuses retried cleanly; 0 GPU faults or recoveries.
  • Lifetimes: vm_bindings around 20 short-lived life.churn clients matched the baseline (5 to 6 live with desktop running, 1 without).
  • Desktop (Hyprland 120 Hz): glmark2-es2-wayland 485 (=0) vs 983 (=1); Glassy blur (2 passes) 30-40 fps (=0) vs 51-61 fps (=1).

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@aeries0x Two things before we take this. Pools now keeps an Arc of the last bound epoch per slot even with the parameter at 0, which keeps that VM's state and admission permit alive until another render uses the slot; please drop those references when the VM goes away or when the submit fails before publication. And if the stress results hold, we would rather have the reuse on by default than behind a parameter; is there a case you know of where it must stay off? We will run the default and =1 cases on an M4 Pro.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Results with the parameter at its default (0), on our J616s (M4 Pro, G16S), merged on integration e661192 as a one-shot test kernel:

  • glmark2-es2 (short run): 22093, against 22736 on the production kernel. That's within what one short run varies by.
  • Vulkan api.smoke: 8/8.
  • No GPU faults or recoveries, 0 DART faults, 0 AVC.
  • 3 s2idle cycles completed cleanly.

We haven't run the =1 case yet. The two questions above (dropping the retained epoch references when the VM goes away or a submit fails, and whether the reuse should be on by default) are still open. We'll merge once those are settled and we've done an =1 run.

@aeries0x aeries0x changed the title drm/asahi: g16: optionally reuse a pass slot's retired PB epoch drm/asahi: g16: reuse a pass slot's retired PB epoch Nov 13, 2026
@aeries0x

Copy link
Copy Markdown
Contributor Author

Thanks for testing on the J616s. Pushed a new revision for both points.

References: the change adds no reference to Pools. A pass slot's binding is a counter now (each render keeps the count it was bound with), and the epoch that gets reused is the slot's owner lease that owners already keeps until a replacement retires. That lease is the one reference left after a VM goes away or a submit fails before publication, with 0 or 1 alike, and it is the base's: InitBM bound the slot to that epoch, so it stays until a later render on the slot replaces it, which this change does not alter. Measured the same way on this commit with 0, with 1 and on the base kernel, vm_bindings goes from 5 to 6 live after 20 short-lived clients with the desktop running (1 left without it) and does not grow further.

Default: now on, with g16_pb_reuse=0 kept as a way back. I don't know of a case where it must stay off, but I have tested only on the J604 (firmware 25G83): stress the same with both settings, no recovery or fault, including the many-clients queue.exhaust case that broke an earlier local version, and injected failures on the reuse paths always followed by a fresh epoch. Your M4 Pro run would be the first run with reuse on another machine. If you'd rather drop the parameter entirely, I'll remove it.

Also new: any firmware recovery, also one that resumes, makes the next render on each slot start fresh, and a host test in test-resources.py covers when an epoch may be reused and that only the owner lease holds it.

The numbers in the description are from this change on top of 673f618 (the tested build differs from the pushed commit only in comments and the commit message). I have not tested suspend with reuse on; if your M4 Pro run includes s2idle again, that would be the first one with the default.

@aeries0x

Copy link
Copy Markdown
Contributor Author

A correction to the desktop line in the description: "also with blur at 2 passes" measured nothing extra. Omarchy ships blur off and blurs only behind see-through surfaces, and the test window was opaque. Measured again with Omarchy's Glassy look (every window 75 % + blur 2 passes), same kernel (673f618 + this change), a 900x600 client pinned in front, 15 s per row, performance profile:

scenario g16_pb_reuse=0 default (1)
idle terminals behind 40.1 fps 60.7 fps
a terminal scrolling 30.0 50.9
workspace switching 37.4 58.6
windows opening/closing 36.1 56.2

Hyprland does ~19-27 renders per frame there. With the default look (no blur) it is 120 fps with both settings.

@davishann15-commits

Copy link
Copy Markdown

Tested on a J604 (MacBook Pro 14", M4, Mac16,1; os-fw 26.6.2, system-fw 27.0; aura 1.0.0b13). The kernel was alarm-aurora's pkgrel 38 recipe on integration/aurora 7c71d6d, plus #1543, #1894, #1895, #1917, #1918, #1919 and #1922. It booted on its own J604 tree as an aura-try trial. Userspace: Hyprland 0.57.2, mesa-aurora 26.3.0_devel.202611130318, speakerguardd-v2 1.0.0alpha.1-40.

glmark2-es2-drm --off-screen at 3024x1964, with Hyprland running, two runs:

scene 2129f55 (no #1543), this morning, no desktop this kernel, Hyprland running
build 512 fps 685 / 677 fps
shading (phong) 509 fps 667 / 667 fps
refract 50 fps 81 / 82 fps
score 356 476 / 474

No GPU fault or recovery line in the log. This is not a same-boot A/B: g16_pb_reuse has no sysfs node (its permissions are commented out), so it can only be set at boot. The two kernels also differ by everything between 2129f55 and 7c71d6d. Treat the gain as an indication rather than this PR's own number.


Disclosure: an LLM (Claude) ran these tests on my Mac and drafted this. I did the listening and looking, reviewed it, and am responsible for it.

Assisted-by: LLM

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-ran our J616s row on head cdb7d9c, now with the parameter at its new default (1): cherry-picked onto integration/aurora fc05050, one-shot test kernel, SELinux enforcing.

The J616s (T6040) binds the G17 backend (apple,agx-t6040 -> ProbeConfig::G17), and g16/ only binds apple,agx-t8132, so the epoch reuse itself doesn't run on this Mac. This is a no-regression row for the shared asahi_core.rs change; the reuse needs a T8132 (J604/J713) row.

production kernel this kernel
gpubench render.light, depth 1 / 8 (median us/submit) 111.5 / 25.3 114.2 / 25.3
gpubench compute.light, depth 1 102.8 99.3
gpubench-stress --all 30 s 16/17 (queue.exhaust: one ETIMEDOUT, lost device) 17/17, queue.exhaust PASS
glmark2-es2-wayland off-screen (build, phong, refract) 13980 15397

0 GPU faults, firmware crashes or recoveries, 0 DART faults, 0 AVC. One s2idle cycle completed, and render.light afterwards was 117.5 us at depth 1. The production queue.exhaust failure was one run on a kernel without this change, not something this branch fixes.

@aeries0x

Copy link
Copy Markdown
Contributor Author

J604 (M4, G16G) results for cdb7d9c, GPU firmware 25G83. I cherry-picked it unchanged onto integration/aurora
c0a2a75 and reverted #1888 locally, because our test kernels keep the speaker path off. The same kernel was
booted once with aurora.g16_pb_reuse=0 and once with the default. No desktop session, performance profile.

=0 =1 (default)
gpubench render.light tri, depth 1 / 8 (median us/submit) 1042 / 842 425 / 233
gpubench compute.light, depth 1 (us/submit) 363 304
gpubench-stress --all 30 s 11 pass, 5 skip, queue.exhaust FAIL 11 pass, 5 skip, queue.exhaust FAIL
glmark2-es2-drm off-screen score (build, phong, refract) 440 697

compute.light does not use a PB, so its difference is boot-to-boot spread. queue.exhaust ends in the driver's ENOMEM
on submit, and --kernel-log counts that log line as a failure. Without --kernel-log it passed on the =1 boot.
The skipped tests need a second queue, sparse residency or ray query.

No GPU faults, firmware crashes, recoveries or DART faults with either setting.

I also ran 6 s2idle cycles with =1 on a third boot of the same kernel. All resumed. Four slept 1 to 9 minutes and
woke on a key press. Two woke on their own within 2 seconds. render.light tri at depth 1 was 421 to 441 us after
each resume, and the kernel log stayed clean.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Tested on J773g (Mac mini M4, 24 GB): a large win, and no regressions in what I ran.

Kernel 7.3.0-ARCH-m4gpu1: linux-aurora pin 9125b31 + #1898 + #1191 + #2232 + the T8132 apple-pmp-thermal cluster fix. Arch Linux ARM, Mesa 26.3.0-devel d4ad4a4dce. Stock module against stock + this PR (cherry-picked clean, g16_pb_reuse at its default 1). The test module also carries #2239 (the J773g S10 top state). That changes only the GPU clock (1470 → 1578 MHz), so ALU-bound rows move about 7% from it alone. The render rows below move far more than that.

gpubench c36cbbe (Vulkan, KWin running, headless), median µs per submit, best of the passes:

test stock + #1543 ratio
render.light tri d1 1351 740 0.55
render.light tri d8 992 331 0.33
render.light tri d64 1000 292 0.29
render.light clear d1 / d8 319 / 272 324 / 266 ~1.0
render.heavy fill 720p d16 1163 533 0.46
render.heavy fill 1080p d16 1389 786 0.57
render.heavy fill 2160p d16 2632 1894 0.72
render.heavy geom 1080p d16 1405 807 0.57
render.tvb 8192 tris d4 2101 1454 0.69
compute.light d16 (no PB) 261 260 1.00

Correctness:

  • A 1/16 sample of the Vulkan CTS 1.4.7.1 mustpass ran on this module: 198,732 cases (84,183 Pass, 114,548 NotSupported, 1 QualityWarning api.object_management.alloc_callback_fail.descriptor_set_layout_empty), 0 Fail/Crash. WSI was excluded; it ran headless at 6 jobs.
  • Over the whole session: 0 GPU faults, recoveries or fail-stops, KWin compositing on the GPU throughout, and a clean Geekbench 6 Vulkan run.

Open, not attributed: gpubench render.light --mode procs at depth 16 hits the graceful submit failed ... ENOMEM on stock too. Once, with this PR, that case then stalled with the GPU idle and was never resumed. I couldn't reproduce it: two later runs of the case alone and of the whole multi chunk passed. I'll report back if it shows up again.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Correction to my J773g report above: the render.light --mode procs depth-16 ENOMEM and the one "stall" came from my harness, not this PR or the driver.

My benchmark ran in a systemd unit with MemoryMax=8G. GPU buffer memory is charged to that cgroup. With 16 rendering processes it hit the limit: the kernel logged submit failed ... ENOMEM, then memcg OOM killed a gpubench process and systemd stopped the whole unit.

Run without the cap, or under 20 GB, the case passes, with stock and with this PR. Nothing is open against #1543 from my side.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Tested on the J773g Mac mini (M4, G16G B0) as the base of #2419, which stacks on this commit: with it, almost every render reuses its slot's retired epoch (30,582 reused / 114 fresh over a gpubench round), and Vulkan CTS 1/16 (84,219 Pass, 0 Fail) and the public GLES/EGL plan (0 Fail) are clean on the stack. #2419 also keeps never-exposed epochs for the next render, which takes render submit CPU from ~190-435 µs to 35-46 µs.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

Not on integration/aurora yet, and the commit (cdb7d9c) applies cleanly to the tip 110861f. Since the last review it has rows on the J604 (aeries0x, =0 vs default), the J773g (DjDeveloperr, Vulkan CTS 1/16 and GLES clean on the #2419 stack) and a no-regression row on the J616s, which does not run the G16 path. The two review questions (references held after a VM goes away, reuse on by default) are answered in the current revision. What's left is the final review; #2419 builds on this commit, so it does not replace it.

Build check of 110861f plus this change (arm64, LLVM=1, Image, dtbs and every directory it touches, Fedora config plus asahi.config): builds, no warnings in the files it touches.

Every G16 render gets a fresh parameter buffer epoch at SUBMIT and an
InitBM ahead of its TA work, so the firmware rebuilds the allocator
state for each render. Reusing the epoch instead cuts a small triangle
render at queue depth 1 on a base M4 MacBook Pro (J604) from 1121 to
492 us.

With this change, the next render of the same VM on a pass slot gets the
slot's owner epoch, without a reseed or InitBM, if that epoch's render
retired normally and was exposed. InitBM binds the device-wide slot to
one epoch and VM, so this happens only while no other epoch was handed
to the slot since; after another VM's render on the slot, after a failed
or aborted render, after any firmware recovery, or after a deep-sleep
firmware restart, the next render starts fresh. SUBMIT still allocates a
fresh epoch for every render, so one is always at hand. Renders are
bound, published and retired one at a time, so the slot's owner is the
epoch it is bound to whenever reuse is allowed.

The reused epoch is the slot's existing owner lease, so this holds no
epoch, VM or admission permit beyond what the lease already holds: a
slot binding is tracked by a counter, not by a reference. A host test
covers when an epoch may be reused and that nothing else holds it.

The stats line counts reused and fresh bindings.

Signed-off-by: Friedrich <[email protected]>
@aeries0x

Copy link
Copy Markdown
Contributor Author

Updated and rebased onto current integration/aurora (5441428d9033), settling the two points noted on #2419:

  • Dropped the g16_pb_reuse module parameter (asahi_core.rs and g16/params.rs are untouched; reuse is always on).
  • Removed the Assisted-by: LLM trailer from the commit message.
  • Added self.pools.invalidate() in g16/sleep.rs::sleep_restart() so the first render on each pass slot starts fresh after the new deep-sleep warm firmware restart.

Booted this exact head on the J604 (base M4 MacBook Pro 14"), performance profile, desktop running:

this head earlier head with =1
render.light tri, us/submit, depth 1 / 8 432 / 237 425 / 233
compute.light, depth 1 291 304
gpubench-stress --all 12 pass, 0 fail, 5 skip 11 pass, queue.exhaust fail with --kernel-log
glmark2-es2-drm off-screen score (build, phong, refract) 685 697

One s2idle cycle (lid closed about 90 s, woken by the lid): it resumed and the kernel log stayed clean. render.light after the resume was 484 to 491 us at depth 1 and 324 to 338 at depth 8 (GPU time per render unchanged at 22 us; the difference is on the submit side, still well below ~1120 us without reuse, though no base-only s2idle comparison was run on 5441428d9033). No GPU faults, firmware crashes or recoveries.

Checks on this head: tools/asahi/run-host-tests.py passes 422/463 (matching base 5441428d9033, asahi-m4 ok), checkpatch.pl --strict is clean, and drivers/gpu/drm/asahi/aurora.o builds cleanly with LLVM=1.

DjDeveloperr
DjDeveloperr previously approved these changes Nov 23, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Formal §1–§6 pre-PR checklist review at e5f348ef1f43ebd307f81c8e3f21615c90264d35 against integration/aurora (70a00e583b03):

  • §1 No model gating: PASS. Applies uniformly to all G16 devices with zero board/SoC/firmware gates. Validated on J604 (two separate machines) and J773g, with a no-regression run on J616s (G17).
  • §2 Production-ready, no hacks: PASS. The earlier g16_pb_reuse module parameter has been dropped so reuse is always on with the default kernel command line. State machine and lifetime invariants verified in g16/{engine,poll,pools,recovery,sleep}.rs:
    • Adds no extra Arc<PbEpoch> references beyond the existing owners slot lease (binds: [u64; 2] + keep: [bool; 2]).
    • Pools::reusable() requires keep[k], Arc::ptr_eq(&owner._vm, vm), and owner.exposed (Acquire).
    • Pools::bind(k, false) increments binds[k] and clears keep[k] immediately, so a deferred (EAGAIN) or failed fresh binding conservatively forces a fresh InitBM next time; a deferred reused binding leaves the retired epoch untouched and safely reusable.
    • Pools::retire_epoch() checks binds[k] == binding under sizes::FLIGHTS == 1 and clears keep[k] when result.is_err(); aborted receipts call Pools::forget(k).
    • Both Firmware::recover() (recovery.rs) and Firmware::sleep_restart() (sleep.rs) call Pools::invalidate(), bumping binds and clearing keep so post-recovery and post-deep-sleep renders start fresh with InitBM.
  • §3 Safety: PASS. No safety bounds weakened; ownership/invalidation invariants are covered by the new host test in test-resources.py.
  • §4 Clean-room & attribution: PASS. Commit e5f348ef1f43 carries human author/committer (Friedrich <[email protected]>) and a single human Signed-off-by: with zero AI trailers (the prior Assisted-by commit trailer was removed); PR body ends with Assisted-by:.
  • §5 Evidence: PASS. Strong same-machine A/B wins on J604 (render.light tri d1 1121→492 us, d8 984→312 us, glmark2 485→983, Hyprland Glassy 30–40→51–61 fps; re-verified on rebased head at 432/237 us with gpubench-stress --all 12 pass / 0 fail / 5 skip and clean s2idle resume), independent J773g A/B (1351→740 us d1, 992→331 us d8) with Vulkan CTS 1/16 (84,183 Pass / 0 Fail) and GLES/EGL (0 Fail), J616s no-regression (0 GPU/DART faults, 0 AVC), and green live CI host-tests on e5f348ef1f43. (Minor non-blocking note: the PR body still mentions 05032b14abf9 in two places instead of the pushed head e5f348ef1f43.)
  • §6 Naming: PASS.

No blockers found; ready for MERGETRAIN-LINUX4.

Assisted-by: LLM (Gemini 4 Neon)

@github-actions github-actions Bot added the area:gpu Area from CODEOWNERS (bot) label Nov 24, 2026
@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot) and removed needs-hw-row No hardware row at the PR head (bot) 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 8cf7c48a: not ready yet

Check Detail
CI at head running running: host-tests, pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 8cf7c48a, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · G16 (M4 / T8132) Macs. A plain revert removes the sleeprestart() pool invalidation; the PB epoch reuse itself is already on main via #2676.

Areas: area:gpu

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

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed ready-to-merge Meets the merge policy: merge it (bot) labels Nov 24, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

The approved head e5f348ef1f43 conflicts with current main (77561654f1c7) in the G16 engine, pools, recovery, and the resource selftest. Please merge main into the existing branch, preserving the current pool and recovery behavior alongside this change, and rerun the affected checks on the resulting head.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed ready-to-merge Meets the merge policy: merge it (bot) labels Nov 24, 2026
Keep current main's G16 engine, pools, recovery, and resource selftest (which already carry the PB epoch reuse and phase-1 recovery invalidation from aurora-silicon#2676), preserving the sleep_restart() pool invalidation in g16/sleep.rs and the matching doc comments in g16/pools.rs.

Signed-off-by: Friedrich <[email protected]>
@aeries0x

Copy link
Copy Markdown
Contributor Author

@RyanTheTide Merged main (dff34de7c681) into j604-pb-pr-r4 at bca99aa2ee3f, keeping main's current G16 engine, pools, phase-1 recovery (02370c0d89cd), and test-resources.py behavior intact.

Note that #2676 (0fb26972a7d6) already landed the PB epoch reuse implementation and unit test on main, so the remaining net diff of this PR against main is self.pools.invalidate() in drivers/gpu/drm/asahi/g16/sleep.rs::sleep_restart() plus the three matching doc comments in drivers/gpu/drm/asahi/g16/pools.rs.

Rechecked on bca99aa2ee3f:

  • tools/asahi/run-host-tests.py (CI container): 491/532 passed on head and base (asahi-m4 pass, 0 regressions).
  • scripts/checkpatch.pl --strict: 0 errors, 0 warnings; drivers/gpu/drm/asahi/aurora.o (LLVM=1) builds with 0 warnings.
  • J604 (Mac16,1, GPU fw 25G83) boot and GPU smoke: 0 failed units, 0 GPU faults/recoveries, 352,620 GPU jobs (pb: reused 127642 fresh 1218 bad 0), gpubench-vk render.light 255 / 207 / 204 us/submit (depth 1/8/64), compute.light 205 / 73 us/submit (depth 1/8), gpubench-stress-vk --all 12 pass / 0 fail / 5 skip, glmark2-es2-drm --off-screen build 1355 / shading 1328 fps.
  • Note on deep sleep: sleep-controller@380700000 is disabled in t8132-j604.dts, so PM_SUSPEND_MEM / sleep_restart() is not reachable on J604 today; Pools::invalidate() itself is covered by test-resources.py.

@aeries0x
aeries0x requested a review from malik-na November 24, 2026 22:15
@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 24, 2026
satchlj
satchlj previously approved these changes Nov 25, 2026

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Gemini 4 Neon on @satchlj's behalf

Verdict at bca99aa2ee3f

APPROVE — Minimal, targeted fix invalidating the G16 PB pools at Firmware::sleep_restart() entry on top of #2676, with green CI and an exact-head J604 (M4) hardware row.

Blockers

None.

Checked

  • Full diff audit (2 files, +10/-5):
    • drivers/gpu/drm/asahi/g16/sleep.rs: calls self.pools.invalidate(); at the start of Firmware::sleep_restart() so stale cached pool entries from before sleep cannot be reused after restart.
    • drivers/gpu/drm/asahi/g16/pools.rs: updates doc comments to reflect sleep-restart invalidation alongside recovery invalidation.
  • Hosted CI at bca99aa2ee3f: 3 successful, 1 skipped, 0 failing (Host tests 7m54s, pr-text 13s, pr-readiness 5s).
  • Hardware evidence: Exact-head J604 (M4) hardware row posted at bca99aa2ee3f.
  • Untested scope: Static diff audit, CI verification, and posted hardware row review only (no local kernel build or boot performed).
Evidence
  • Head: bca99aa2ee3f (OPEN|false|MERGEABLE)
  • Diff audited in full: 2 files (+10/-5)
  • CI: All checks were successful (3 successful, 1 skipped, 0 failing, 0 pending)

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Nov 25, 2026
Keep main's Pools layout and preserve the sleep-restart doc-comment
updates in drivers/gpu/drm/asahi/g16/pools.rs.

Signed-off-by: Dj <[email protected]>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Nov 25, 2026

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Gemini 4 Neon on @satchlj's behalf

Audited 8cf7c48a5d09 (drivers/gpu/drm/asahi/g16/sleep.rs, drivers/gpu/drm/asahi/g16/pools.rs):

  • Correctness: Calling self.pools.invalidate() at entry to Firmware::sleep_restart() (before self.session.rtkit.warm_restart()?) bumps every pass slot's binds generation and clears keep = false (g16/pools.rs:1085-1090), ensuring the next render on every slot after a sleep restart runs InitBM fresh rather than assuming firmware retained the pre-sleep PB epoch.
  • CI (8cf7c48a5d09): host-tests, readiness, and pr-text are all green.

LGTM — approving.

@DjDeveloperr
DjDeveloperr merged commit 1921ecb into aurora-silicon:main Nov 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) 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.

5 participants