Skip to content

drm/asahi: g17: retire latched compute queues and split multi-command work states - #3330

Merged
RyanTheTide merged 5 commits into
mainfrom
perf/g17-granular-workstate-retire
Nov 29, 2026
Merged

RyanTheTide merged 5 commits into
mainfrom
perf/g17-granular-workstate-retire

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What

Eliminates two host-side retirement bottlenecks on G17 that left completed render and compute commands unretired for 2-11 ms:

  1. Retire compute queues with latched completion observations (g17/queue/compute.rs): scan_compute_summary() latches completion records from the shared compute completion ring into active.observed for every physical queue, even when the waking event mask names another QID. Queue::retire() previously skipped queues whose !self.selected(masks) and retirement_polling() ignored active.observed.is_some(), stranding already-finished compute commands up to 11.45 ms until an unrelated event woke the worker. Treat a latched front observation as selected for retirement and polling.
  2. Split WorkStateLease across multi-command submissions (g17/context/identity.rs, g17/context.rs, g17/fence.rs, g17/queue/mod.rs): G17 firmware stores completion stamps for a work-state node only once every kick counted on that node completes. When a multi-command DRM_IOCTL_ASAHI_SUBMIT ioctl packs dozens of commands onto one shared WorkStateLease, early commands cannot retire until the last command finishes (2-6 ms later), pinning the 32-slot render ring full and delaying timestamp writers needed by later query_access computes. Give multi-command submissions per-chunk ChunkWork holders (releasing their WorkStateLease immediately on chunk retirement/drop, matching Submission's lifecycle), splitting at RENDER_DEPTH / 8 commands, after host-timestamp writers, and before query_access computes. Expand ORDER_WINDOW from 1024 to 2048 and cap extra intra-ioctl splits via WorkStateLease::deferred_split() at ORDER_WINDOW / 2 so 1024 full ordinals remain permanently reserved for new ioctls. Single-command ioctls keep the existing Submission path unchanged.

Tested

  • J714s (M5 Pro, G17S B1) at 8962d5f51572 (exact head, standalone): PASS (#issuecomment-7206654524; 170/170 query/multiview CTS, 170 s BeamNG wcusa smoke, 0 GPU faults, 0 EBUSY, 0 WARN).
  • J700 (MacBook Neo, G17P) at 8962d5f51572 (2nd-gen exact head): PASS (#issuecomment-7207257611; 67,553/0 compute.*, 3,000/0 sync smoke, 1,928/0 query_pool, gpubench-vk/gl CRCs clean, 0 EBUSY/faults).
  • Host verification at 8962d5f51572: PASS (223/223 run-host-tests.py --only g17, including g17-chunk-work-guard-tests + 2 mutations; checkpatch.pl --strict --ignore FILE_PATH_CHANGES 0/0/0).
  • J714s (M5 Pro, G17S B1) at bec51415b9e1 (stacked on drm/asahi: g17: do not host-wait query_access on timestamp-free chains #3319 for game-FPS A/B): PASS (0 GPU faults, 0 EBUSY, 170/170 query/multiview CTS).
  • Host verification:
    • ./scripts/checkpatch.pl --strict --git origin/main..HEAD: 0 errors, 0 warnings, 0 checks on both commits.
    • python3 tools/asahi/run-host-tests.py --only g17: 223/223 passed (g17-chunk-work-guard-tests + 2 mutations added at 8962d5f51572).
  • J714s (Apple M5 Pro, G17S, native 3024x1964, GP_NOANAT=1, identical Mesa kit inst-K libvulkan_asahi.so 1cf23c9f22d5), tested stacked on drm/asahi: g17: do not host-wait query_access on timestamp-free chains #3319 (NO_TS) with 0 GPU faults, 0 EBUSY, 0 kernel errors:
    • Vulkan CTS (deqp-vk 1.4.7.1): query_pool.occlusion_query.copy_* 152/152 PASS (7 unsupported), query_pool.concurrent_queries.* 2/2 PASS, multiview.queries.* 16/16 PASS.
    • GTA V Pass 4 FPS:
      • origin/main baseline: 41.24, 41.41 (mean 41.33).
      • #3319 alone: 50.17, 51.51, 49.89 (mean 50.52).
      • #3319 + this PR (clean): 52.66, 52.87 (mean 52.77, +4.5% over #3319 alone, +27.7% over origin/main; GPU union busy 89.31% -> 91.44%).
    • BeamNG wcusa steady-state windows 2-5 FPS:
      • origin/main baseline: 34.79 mean.
      • #3319 alone: 35.87 mean (1% low ~34.5).
      • #3319 + this PR: 36.44, 36.31, 36.24 (mean 36.33, +1.3% over #3319, +4.4% over origin/main; 1% low rose 34.5 -> 36.0-36.4, +4.5%).
      • 24 MHz GPU hop instrumentation on BeamNG: GPU union busy 91.82% -> 94.04%, median retirement latency 319.1 us -> 59.8 us (5.3x), compute >2 ms retire stalls 2,556 -> 0, idle gaps >200 us 230.9 ms (2.31% wall) -> 14.5 ms (0.14% wall, 16x reduction).

Risk

Risk: two-way · G17 compute retirement and multi-command work-state lifecycle (drivers/gpu/drm/asahi/g17/context/identity.rs, context.rs, fence.rs, queue/compute.rs, queue/mod.rs); no UAPI or firmware ABI changes, single-command ioctls unchanged, cleanly revertible.

Not yet

  • Further reducing host CPU submission overhead (vkd3d_queue CPU time) if needed is out of scope here.

…tions

scan_compute_summary() latches completion records from the shared
compute completion ring into active.observed for every physical queue,
even when the waking event mask names only another queue. Queue::retire()
previously gated retirement on selected(masks), skipping queues whose
front command already had a latched completion observation and leaving
retirement_polling() false when no later stamp event arrived for that QID.

Treat a latched front observation as selected for retirement and polling
so already-completed compute commands retire on the same pass instead of
stalling behind unrelated events.

Signed-off-by: DjDeveloperr <[email protected]>
The G17 firmware stores completion stamps for a work-state node only
once every kick counted on that node finishes. When a multi-command
submit ioctl packs dozens of render and compute commands onto one
shared WorkStateLease, early commands cannot retire until the last
command in the ioctl completes (often 2-6 ms later), pinning the
render ring full and delaying timestamp writers needed by later
query_access computes.

Give multi-command submissions per-chunk ChunkWork holders that release
their WorkStateLease immediately once every member of the chunk retires
or drops (matching Submission's lifecycle so exported fences never pin
work states). Split chunks at RENDER_DEPTH / 8 commands, after
host-timestamp writers, and before query_access computes. Expand
identity::Order's ORDER_WINDOW to 2048 and cap extra intra-ioctl splits
at ORDER_WINDOW / 2 so 1024 full ordinals remain permanently reserved
for new ioctls. Single-command ioctls keep the existing Submission path
unchanged.

Signed-off-by: DjDeveloperr <[email protected]>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 26, 2026 23:23
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Merge readiness at 6acd500c: not ready yet

Check Detail
CI at head running running: KUnit spi-hid-apple, KUnit avd, KUnit ave, KUnit isp, KUnit jpeg, KUnit prores
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 6acd500c, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · G17 compute retirement and multi-command work-state lifecycle (drivers/gpu/drm/asahi/g17/context/identity.rs, context.rs, fence.rs, queue/compute.rs, queue/mod.rs); no UAPI or firmware ABI changes, single-command ioctls unchanged, cleanly revertible.

Areas: area:gpu

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

@DjDeveloperr

DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Verdict at 8962d5f51572: ready

My blocker at bec51415b9e1 is fixed. Each ChunkWork now starts with an enqueue hold, as Submission does, and the hold is released only after the enqueue loop ends. A command that retires or is dropped early can no longer take its chunk's work state away from the next command.

Blockers

none

Checked

  • The hold.
    • ChunkWork::new starts remaining and owners at 1.
    • submit() records every chunk it creates (the first one and each split) and hands them to Outputs::publish_with_status().
    • Outputs::drop calls ChunkWork::finish_enqueue(self.result) for each chunk, before the aggregate's own finish_enqueue. finish() sets self.result first, so the hold is released with the ioctl's real result.
  • Each path.
    • Success: if every member already retired, the hold's member_done(Ok) takes remaining to 0 and releases the lease at once. Otherwise the last member releases it.
    • Partial enqueue error: finish_enqueue(Err) marks the chunk failed. The lease then goes when the last attached member drops, or straight away for a chunk no command reached. Nothing leaks or waits on a hold that is never released.
    • publish_with_status fails after taking the chunks: Outputs::drop still releases the holds.
    • An error inside the chunk loop, before the hand-over: the chunks were never shared and drop with their lease.
    • Exported fences: they hold the aggregate, not a ChunkWork, so they still don't pin a work state.
  • New host test (tools/asahi/g17-chunk-work-guard-tests.py).
    • It compiles the production ChunkWork methods, takes the 1/1 initialisers from the source, and checks the submit() and Outputs::drop wiring.
    • It covers four cases: an early retire, an early drop, every member done before finish_enqueue, and an unused chunk on error.
    • It is registered in run-host-tests.py with no-guard and no-finish-enqueue as KILL mutations. Both end in a Rust panic, which is the runner's kill sign. A failed compile would show as a traceback instead, so the mutations can't pass by accident.
    • My own edits to the driver source are each caught: removing the Outputs::drop loop, starting remaining at 0, and leaving owner_done out of finish_enqueue.
  • Earlier checks still hold: compute retirement with latched records, split ordering and caps, may_take(), status identity, the single-command path, and error lifetimes. The new commit doesn't touch them.
  • Tests at head.
    • run-host-tests.py --only g17: 223/223, including the new test and both mutations.
    • asahi KUnit (arm64, 16K): 465 run, 461 passed, 4 skipped; it builds with the new fence.rs and queue/mod.rs code, and the two split tests pass.
    • checkpatch --strict: no errors. Its only warning is the usual MAINTAINERS note for a new file under tools/asahi/.
  • Merge and text.
    • It fast-forwards from bec51415b9e1 and merges cleanly with main (8e2ee15f3ca3).
    • Commit and PR text are neutral and carry no attribution. The body says the J714s row was taken at bec51415b9e1, before this commit.

Before merge

  • Hardware rows. The PR body's Not yet lists both rows still owed: the J700 (G17P) second-generation row at 8962d5f51572, and the exact-head J714s re-check.
Evidence
8962d5f51572ea2e13e11b73a9b06ab74824b531 (fast-forward of bec51415b9e1), base main 8e2ee15f3ca3, merge-tree clean
fence.rs  ChunkWork::new: remaining 1, owners 1; finish_enqueue = member_done(result) + owner_done()
fence.rs  Outputs::finish sets self.result; Drop: for chunk in &self.chunks { chunk.finish_enqueue(self.result) }
queue/mod.rs submit(): chunks.push(chunk.clone()) at the first chunk and each split -> publish_with_status(.., chunks, ..)

g17-chunk-work-guard-tests.py                       -> PASS
  --mutation no-guard                               -> panicked (exit 101)
  --mutation no-finish-enqueue                      -> panicked (exit 101)
my source mutations (reverted):
  Outputs::drop loop removed                        -> AssertionError: Outputs::drop missing chunk finish loop
  ChunkWork remaining starts at 0                   -> AssertionError: ChunkWork::new must start remaining at 1
  finish_enqueue without owner_done                 -> panicked
run-host-tests.py --only g17                        -> 223/223 passed
kunit.py run --arch=arm64 LLVM=1 --kunitconfig=drivers/gpu/drm/asahi -> Ran 465 tests: passed 461, skipped 4
checkpatch.pl --strict bec51415b9e1..HEAD           -> 0 errors, 1 warning (MAINTAINERS, new file)

Unlike Submission, ChunkWork started remaining and owners at 0 and
counted each command only when enqueue() attached it. Because enqueue()
submits command k to the GPU immediately and latched compute retirement
can complete in ~60 us, preempting the ioctl thread before command k+1
attaches lets command k retire or drop, driving the ChunkWork counts to
0 and releasing its WorkStateLease early so command k+1 fails with
ECANCELED.

Give ChunkWork the same initial remaining=1 / owners=1 enqueue guard as
Submission, pass the created chunks into Outputs::publish_with_status(),
and release each chunk's guard via ChunkWork::finish_enqueue() in
Outputs::drop() after the enqueue loop finishes.

Add g17-chunk-work-guard-tests (with two mutations) covering early
retire and early drop of command 0 before command 1 attaches, all-early
completion before finish_enqueue(), and error teardown.

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

Copy link
Copy Markdown
Contributor Author

Fixed the ChunkWork early-retire/drop race in fast-forward commit 8962d5f51572 (8962d5f51572ea2e13e11b73a9b06ab74824b531):

  • ChunkWork::new() now starts remaining and owners at 1 (matching Submission's enqueue guard) and exposes ChunkWork::finish_enqueue().
  • submit() passes the created chunk handles into Outputs::publish_with_status(), and Outputs::drop() releases every chunk's guard after the enqueue loop finishes (both on success and on partial-enqueue error).
  • Added tools/asahi/g17-chunk-work-guard-tests.py (registered in run-host-tests.py, with no-guard and no-finish-enqueue mutations) reproducing early retire and early drop of command 0 before command 1 attaches, all-early completion before finish_enqueue(), and error teardown.
  • Verified: python3 tools/asahi/run-host-tests.py --only g17 -> 223/223 passed, checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git HEAD~1..HEAD -> 0/0/0.
  • Updated the PR body to list the J700 (G17P) second-generation row and the exact-head J714s re-check under ## Not yet.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J714s (MacBook Pro 14" M5 Pro, G17S B1) row at exact head 8962d5f51572: PASS.

  • Kernel: 7.3.0-m5-rows-k3330h, a warm native build on the M5 of this PR's head 8962d5f51572 alone, not stacked on linux#3319.
  • Boot: the default command line, headless. The default kernel (7.3.0-m5-cdirect16) was restored afterwards with a clean systemctl reboot, and all 253 ESP file hashes were verified.
  • Mesa: the system Borealis/Mesa (aurora-m5 ICD) throughout.

1. Vulkan CTS (deqp-vk 1.4.7.1, 8 jobs): 177 cases, 170 Pass and 7 NotSupported.

Group Cases Result
query_pool.occlusion_query.copy_* 159 152 Pass, 7 NotSupported
query_pool.concurrent_queries.* 2 2 Pass
multiview.queries.* 16 16 Pass

There were 0 EBUSY in the runner and case logs.

2. Multi-command submit smoke: one BeamNG west_coast_usa run, DX11 through Proton, 170 s in five windows. The output was muted, and the game settings were restored byte-identical afterwards.

Window 1 2 3 4 5
FPS 16.61 16.58 16.49 16.43 16.44
p99 ms 60.64 60.50 61.16 61.19 61.21
  • The run had 0 EBUSY and 0 device-lost lines.
  • This is a sanity run on the older system Mesa, not a performance A/B. The PR's FPS numbers come from the game-campaign kits.

3. Kernel log for the whole boot:

  • 0 GPU MMU faults, 0 G17 recoveries, 0 firmware crashes and 0 WARN/BUG/Oops.
  • 0 "compute publication … gave up" lines and 0 EBUSY.
  • One distinct error-level line (apple-dcp … DCP requested undeclared provider clock index), which the default boot also logs.
  • Failed units: tailscaled.service only, the same as on the default boot.
  • The GPU was online after every phase, with 0 crashed and 0 quarantined owners.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J700 (MacBook Neo, G17P B1) at 8962d5f51572: PASS. 0 non-pass CTS cases and clean gpubench CRCs, with no faults, warnings or EBUSY.

  • Setup: a one-shot boot of a kernel built from the Neo's 7.3.0-41 config; the running build ID (5c2d82c2f593) matched the vmlinux built from this head. System Mesa 26.3.0-30, headless.
  • CTS: no case failed, so there was no base boot.
    • dEQP-VK.compute.* (67,553 cases, all of compute: pipeline, shader_object_spirv, shader_object_binary): 12,040 Pass, 55,513 NotSupported, 0 Fail.
    • Sync smoke (synchronization*): 3,000 cases recorded within the time budget, out of a 6,400-case sample (basic, smoke, the timeline_semaphore groups, and 1 in 100 of op.single_queue/op.multi_queue). 2,903 Pass, 97 NotSupported, 0 Fail. The recorded cases are mostly timeline_semaphore (2,774) and synchronization.op (190).
    • dEQP-VK.query_pool.*, 1 in 10 (1,928 cases: mostly statistics_query, with occlusion_query, discard, performance_query and concurrent_queries): 1,925 Pass, 3 NotSupported, 0 Fail.
  • gpubench:
    • gpubench-vk compute.light, compute.heavy (alu), render.light, render.heavy (fill, 1080p), copy.bw and transfer.ops at depths 1 and 2: all ok, with 0 CRC/check mismatches (transfer.ops output checks valid) and 0 busy errors.
    • gpubench-gl --verify on render.light, render.heavy and compute.heavy: all ok.
  • Health: 0 GPU recoveries, 0 MMU faults, 0 driver warnings, 0 kernel WARN/BUG and 0 EBUSY/-16 lines. Also 0 new kernel error lines compared with stock, 0 AVC denials, 0 failed units and 0 core dumps.
  • Restore: a clean reboot to 7.3.0-41, PMU boot-error count 00, and the test kernel, initramfs, modules and BLS entry removed (checked identical to the pre-install snapshot). stock.sh was identical.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 8962d5f5 (once cancelled CI checks are rerun green)

Blockers: none (code, host tests, and two-generation exact-head hardware rows are ready; rerun the 3 cancelled CI checks before merge).

Checked:

  • drivers/gpu/drm/asahi/g17/queue/compute.rs:1105-1143: verified retirement_polling() and selected() both check self.active.front().is_some_and(|a| a.observed.is_some()) so latched completion records are retired immediately.
  • drivers/gpu/drm/asahi/g17/context/identity.rs, context.rs, fence.rs, queue/mod.rs: verified ORDER_WINDOW = 2048 / ORDER_SPLIT_LIMIT = 1024 preserves 1024 full ordinals for new ioctls; verified ChunkWork initializes remaining = 1 and owners = 1 enqueue guards released in Outputs::drop() via finish_enqueue(self.result) so early-retiring or dropped commands cannot free a chunk's WorkStateLease before later commands in the chunk attach; single-command ioctls remain unchanged.
  • tools/asahi/g17-chunk-work-guard-tests.py: verified guard test + 2 mutations (no-guard, no-finish-enqueue).
  • Verified exact-head (8962d5f51572) standalone hardware rows on both J714s (M5 Pro, G17S: 170/170 CTS, 170 s BeamNG, 0 faults) and J700 (Neo, G17P: 67,553/0 compute.*, 3,000/0 sync smoke, 1,928/0 query_pool, clean gpubench CRCs).
Evidence
  • Diff reviewed at 8962d5f5 (all 7 files, 650 lines).
  • CI at review time: 20 passed, 0 failed, 3 cancelled.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train status at 8962d5f5 (App approval noted; rows: 3 cancelled; J714s + J700 exact-head PASS). @DjDeveloperr code-owner ping (6-point rule, point 6): merge earliest 17:15 AEDT once full CI is green (I re-ran cancelled jobs) and the second-family row point holds. Revert: git revert -m 1 <merge>.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging under the 6-point rule (Ryan 09:29, permanent), at 8962d5f5. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J714s+J700. (5) There's no blocking review. (6) Dj was pinged here 60 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Correction to the merge note above: the merge didn't happen. After the PRs merged just ahead of it (#3285 and others), this branch no longer merges cleanly with main. @DjDeveloperr, please forward-merge main (no force push). It goes back into the queue at the new head, and the App re-approval plus the rows still apply if the merge is conflict-only.

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Nov 28, 2026
Forward-merge main. g17/queue/mod.rs conflicted where main started
reusing the submit scratch (guards.drain_all(), pending.drain_all()):
the work-state split and ChunkWork per command are kept as in this
branch, iterating the scratch the way main does now. Main's new
query-access ordering test sits next to the work-state split test.

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

Copy link
Copy Markdown
Contributor

Forward-merged main into this branch (merge commit 33b7e5a, no force push). The g17/queue/mod.rs conflict came from main now reusing the submit scratch (guards.drain_all() / pending.drain_all()). Your work-state split, ChunkWork lease and per-command work_states.next() are kept as they were, and only the iteration follows main's scratch API. Main's new query-access ordering test sits next to your split test.
Tests: run-host-tests.py --only g17 passed 261 jobs, including g17-chunk-work-guard-tests and its no-guard/no-finish-enqueue mutations. Only g17-compute-owed-stamp-tests failed, and it fails on main too: its stub still has note_retired() while main's compute.rs calls note_retired(front.published). This merge did not cause it.
Still needed: CI and App re-approval at the merge head. Driver logic is unchanged beyond the scratch iteration, so the J714s/J700 rows should hold. A short J714s/J700 smoke is up to the reviewer. Thanks @DjDeveloperr.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Re-reviewed the queue merge resolution. It retains the per-command work-state attachment while consuming main's reusable pending and guard scratch via drain_all(), with one guard and one work-state entry consumed per command. The query-access ordering and work-state split coverage both remain. Keep current-head hosted CI and the runtime evidence gates.

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping @DjDeveloperr: closeout merge at 33b7e5a6. The App approved at this head after the closeout forward-merge/fix. Rows: J714s + J700 at the pre-merge head; the merge only resolves scratch-iteration code in queue/mod.rs. Merging under the 6-point rule 1 h from now, once hosted CI at this head and main CI are green, unless you object.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Updated the branch with main (now 6acd500c) to pick up #3594, which fixes the g17-compute-owed-stamp host-test stub that failed here. There are no code changes in this PR. The App approval at 33b7e5a6 and the rows still hold; merging once CI at this head is green.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging under the 6-point rule (Ryan 09:29, permanent), at 6acd500c. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J714s-+-J700-at-the-pre-merge-head;-the-merge-only-resolves-scratch-iteration-co. (5) There's no blocking review. (6) Dj was pinged here 436 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit d1c9401 into main Nov 29, 2026
22 of 23 checks passed
@RyanTheTide
RyanTheTide deleted the perf/g17-granular-workstate-retire branch November 29, 2026 13:24
RyanTheTide added a commit that referenced this pull request Nov 30, 2026
Main (#3330, granular work-state retire) added a multi-command path
that splits an ioctl into chunked work-state leases and publishes them
with Outputs::publish_with_status(), next to the single-command
Outputs::publish(). This branch makes publish() take a lease created
by the caller, so the interruptible order-window wait happens before
any output is published.

Kept both: the multi-command path is main's unchanged (its first
WorkStateLease::deferred() now waits interruptibly too, before
publication); the single-command path creates its lease before
publish() as this branch does. note_render() runs just before either
publication, after any wait. Outputs keeps main's publish_source()
split with this branch's publish_with(Option<lease>) on top.

tools/asahi/g17-output-fence-tests.py (main, #3311/#3648) extracts
impl Submission and expected one Arc::new() there, the one in
Submission::new(), which this branch removes; it now expects none.

Signed-off-by: Ryan Murray <[email protected]>
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) 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