Skip to content

drm/asahi: g17: bound submit syncs, install repeated timeline outputs once, return closed queues' identities at close - #3200

Open
DjDeveloperr wants to merge 12 commits into
mainfrom
fix/g17-submit-syncs-and-closed-queues
Open

DjDeveloperr wants to merge 12 commits into
mainfrom
fix/g17-submit-syncs-and-closed-queues

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What: Three fixes on the G17 submit and queue-close paths. A SUBMIT's syncs get the bound G15 and G16 already apply, checked before they are parsed. Timeline outputs of one submission that name the same syncobj are installed once, at their highest point, instead of once each. A closed queue whose context the firmware never saw returns that context's execution identity, QoS ID and unused render identity at close, instead of when its last cancelled job is freed.

Tested: build and host tests on the current code: the arm64 driver builds with KUnit on, no new warning; run-host-tests.py --only g17 331/331, including g17-submit-outputs-tests (it fails on the code before that commit). An older head (7121f2ebd2f8) has a J700 row, but the output merge has changed since, so it does not count for this one.

Risk: two-way door · every Mac for the output merge (shared file.rs sync parsing); A18 Pro and M5 for the sync bound and the close path.

Not yet: J700 (A18 Pro) and J714s (M5 Pro) rows for the current code: the Vulkan sync CTS subset against base, both tests below, and a kill/teardown stress. They are required: the output merge and the close path change at run time.

Details

1. drm/asahi: g17: bound a submission's syncs before parsing them

The ioctl parses every input and output sync before the queue sees the submission. Each becomes a parsed record holding a syncobj and fence reference, and each timeline output also gets a chain node that its syncobj keeps once the output is installed. G17 had no bound on how many. G15 and G16 refuse more than 4096 in total, but only in their queues, after parsing.

The bound moves to file.rs as MAX_SYNCS_PER_SUBMISSION, which G15 and G16 now name; their behaviour is unchanged. A new Gpu::max_syncs() admission bound is checked next to max_cmdbuf_size(), before anything is copied or allocated. G17 returns the shared bound, so userspace that submits on G15 and G16 submits the same way on G17. Other generations keep returning no bound.

2. drm/asahi: install a submission's timeline outputs on one syncobj once

Every output of a submission gets the same fence. drm_syncobj_add_point() walks the syncobj's chain after each installation, one node per step while the fence it holds is unsignalled, and each installation adds a node. N outputs naming one timeline syncobj therefore cost N(N+1)/2 chain steps under the queue lock. G17 installs outputs both when it accepts a submission and when it refuses one after resolving its outputs, so an empty command stream is enough.

This isn't only a malformed-input case. Mesa's Vulkan runtime merges a signal-only batch into the batch before it, so one submission can signal a timeline at two rising points.

The parser now merges them before any chain node is allocated. It keeps the last output of each timeline syncobj, raised to the highest of that syncobj's points. Waits don't change: dma_fence_chain_find_seqno() resolves any of the merged points to that one node, whose fence is the submission's, and the syncobj's last submitted point is the same. Binary outputs are left alone, and one that names the same syncobj ends a merge: it replaces the chain, so timeline 9, binary, timeline 7 still ends at 7. The cumulative anchor never merges, so an output aliasing it is still refused. The merge sorts the outputs, and allocates only when there are at least two timeline outputs.

This sits in shared file.rs, so every generation's submissions get it. It changes nothing a waiter can observe.

3. drm/asahi: g17: return a closed queue's unpublished identities at close

A context holds an execution identity, a QoS ID and, on some variants, a render identity, all from small device-wide pools. If the firmware saw the context, closing the queue arms a scheduler release, and the identities return once the firmware has consumed it. If it never saw the context, teardown::Pending::close() keeps nothing, and the identities return only with the context's last reference.

That reference can outlive the queue for as long as userspace likes. When a client exits, its scheduler entities cancel the jobs still waiting for an input fence. drm_sched frees such a job only after every one of its dependencies has signalled (drm_sched_entity_kill_jobs_work()), and the job holds the queue's backend, and through it the context. The queue's admission slot and its process's queue share, though, are returned at close. So each exiting client with such a job leaves an execution identity in use that no open queue accounts for. On M5, where every queue has its own, enough of them leave a new queue waiting for contexts that aren't actually closing, until it fails with ENOSPC.

Once both schedulers are torn down, nothing of the queue can be published, so the firmware can never see that context. release_queue() now returns its execution identity (through the shared-context bookkeeping on A18 Pro), its QoS ID and its unused render identity right there, next to the queue's admission. The cancelled jobs keep only memory, and still signal their outputs after their inputs, as drm_sched requires. QosLease gives its ID back exactly once, either early or on drop. A published context is unchanged: its identities still wait for the consumed release.

Merging with #3021

#3021 turns the sync list into a KVVec. Whichever of the two lands second needs coalesce_outputs() to take the other's vector type; the logic doesn't change.

Evidence
  • Build: ./linux-build/build kernel --profile asahi <tree> -- drivers/gpu/drm/asahi/ at 43f3740cfbd05, exit 0. No warning in a changed line.
  • checkpatch --strict: 0/0/0 on all three commits.
  • New KUnit cases: asahi_submit_outputs (distinct syncobjs untouched; rising and falling points keep the last output at the highest point; 4096 repeats of one point leave one output) and asahi_g17_qos_capacity::an_id_given_back_early_is_given_back_once.
  • Hardware tests for the rows (run as root, headless):
    • dup-outputs: raw ioctls with no GPU work. It names one timeline syncobj from 1024, 2048 and 4096 outputs, then rising points 1 to 4096, then 4097 syncs. It expects time to grow about linearly, every point to be waitable, and 4097 to be refused with nothing installed, and timeline 9, binary, timeline 7 on one syncobj to end at 7.
    • killed-jobs: twelve clients each submit a fill behind a chain of bounded compute dispatches (8 × ~0.8 s, each inside the 2 s watchdog) and are SIGKILLed while the chain runs. It compares /sys/kernel/debug/aurora-g17/capacity after the kills against after the chain finished. Expected: no execution contexts or QoS IDs held by the killed jobs.
    • Stress: 60 deqp-vk sync clients SIGKILLed at random points, three killed-jobs rounds, then a kernel log check.

A SUBMIT names its input and output syncs by count and pointer, and the
ioctl parses every one of them before the queue sees the submission:
each becomes a parsed record holding a syncobj and fence reference, and
each timeline output a chain node its syncobj keeps once installed.
G17 put no bound on their number. G15 and G16 refuse more than 4096 in
total, but only in their queues, after parsing.

Move that bound to file.rs as MAX_SYNCS_PER_SUBMISSION, which G15 and
G16 now name, and give the GPU trait a max_syncs() admission bound that
the ioctl checks next to max_cmdbuf_size(), before anything is copied
or allocated. G17 returns the shared bound, so userspace that submits
on G15 and G16 submits the same way on G17. Other generations keep
their current behaviour.

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
Every output of a submission receives the same fence. Installing a
timeline point, drm_syncobj_add_point() walks the syncobj's chain for
garbage collection, one node per step while the fence it holds is
unsignalled, and each installation adds a node. N outputs that name one
timeline syncobj therefore cost N(N+1)/2 chain steps under the queue
lock, and keep N chain nodes on the syncobj. G17 installs its outputs
both when it accepts a submission and when it refuses one after
resolving them, so an empty command stream is enough.

Such submissions are not only malformed ones: the Vulkan runtime merges
a signal-only batch into the batch before it, so one submission can
signal a timeline at two rising points.

Merge those outputs before any chain node is allocated: keep the last
output of each timeline syncobj, at the highest of its points. Waits are
unchanged: dma_fence_chain_find_seqno() resolves any of the merged
points to the one node, whose fence is the submission's, and the
syncobj's last submitted point is the same. Binary outputs are left as
they are, and the cumulative anchor never merges, so an output aliasing
it is still refused. The merge sorts the outputs that can merge, and
allocates only when a submission has two or more of them.

KUnit: asahi_submit_outputs.

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
A queue's context holds an execution identity, a QoS ID and, on some
variants, a render identity, all from small device-wide pools. If the
firmware saw the context, closing the queue arms a scheduler release,
and the identities return when the firmware has consumed it. If it never
saw the context, teardown::Pending::close() keeps nothing, and the
identities return only with the context's last reference.

That reference can outlive the queue by as long as userspace likes.
When a client exits, its scheduler entities cancel the jobs still
waiting for an input fence, but drm_sched frees such a job only once
every one of its dependencies has signalled
(drm_sched_entity_kill_jobs_work()), and the job holds the queue's
backend and so its context. Meanwhile the queue's admission slot and
its process's queue share are returned at close. Each exiting client
with such a job then leaves an execution identity in use that no open
queue accounts for. On M5, where every queue has its own, enough of
them leave a new queue waiting for contexts that are not closing, and
it fails with ENOSPC.

Once both schedulers are torn down nothing of the queue can be
published any more, so the firmware can never see that context: return
its execution identity, QoS ID and unused render identity at close,
next to the queue's admission. The cancelled jobs keep only memory, and
still signal their outputs after their inputs, as drm_sched requires.
QosLease now gives its ID back once, early or on drop.

KUnit: asahi_g17_qos_capacity (an_id_given_back_early_is_given_back_once).

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 26, 2026 06:59
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (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 0c4976b9: not ready yet

Check Detail
CI at head ok 11 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head no no line with the head SHA 0c4976b9, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · every Mac for the output merge (shared file.rs sync parsing); A18 Pro and M5 for the sync bound and the close path.

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 b04ba72e86ee: ready

Blockers: none

At 43f3740cfbd0 two host-test stand-ins did not build: the release_queue() fixture in g17-admission-order-tests.py and the mod file of asahi-m4/test-command-stream.py. The new commit b04ba72e86ee is test-only. It gives the stand-in Context a no-op release_unpublished() and the stand-in file module MAX_SYNCS_PER_SUBMISSION, and touches no driver file. host-tests is green at this head.

Checked:

  • Sync bound: in_sync_count + out_sync_count is summed as usize from two u32s, so it cannot wrap. It is checked before parse_array() copies or allocates anything. Only G17 returns a bound. G15 and G16 keep their refusal in the queue, so for them nothing changes.
  • Output merge: the chain nodes are allocated after coalesce_outputs(), so a merged-away output never gets one. Inputs, binary outputs and the cumulative anchor are left alone. The anchor index is shifted by the number of merged outputs before it. retain() walks the sorted merged list once. Keeping the last output at the highest point gives the syncobj the same last point, and dma_fence_chain_find_seqno() resolves any merged point to that one node. The four KUnit cases cover distinct syncobjs, rising points, falling points and 4096 repeats.
  • Early release at close:
    • It runs only when teardown.close() kept nothing, after both entities and the compute and render owners are released, and it checks is_published() again.
    • Execution release is already once-only (ExecutionRoot::released, exec_share::Use::done). QosLease::give_back() is now once-only too, and the new KUnit case shows that dropping the early holder does not free the ID's new owner.
    • A context bound to a compute graph is marked published at bind, so retain_firmware_pages(), which keeps a QosLease, never sees one that was released early.
  • Merged-code rules: no runtime switch and no SoC or board gate. The 4096 is the existing G15/G16 value, now named once in the driver. The asahi-m4 stand-in repeats it, as that fixture already does for MAX_COMMANDS_PER_SUBMISSION.
  • Not blocking: G15 and G16 still parse every sync before their queue refuses more than 4096. Returning the same max_syncs() there would refuse them before any record is built, with the same result for userspace.
Evidence
  • git diff 43f3740cfbd0 b04ba72e86ee: only tools/asahi/g17-admission-order-tests.py (+2) and tools/testing/selftests/drivers/gpu/asahi-m4/test-command-stream.py (+1/-1).
  • CI at b04ba72e86ee: host-tests success, apple-build success.
  • Build at 43f3740cfbd0 with the asahi profile (LLVM, Rust): rust/ and drivers/gpu/drm/asahi/, exit 0, no warning on a changed line. The driver code is unchanged since then.
  • CI KUnit asahi at 43f3740cfbd0: 468 run, 464 pass, 4 skipped. asahi_submit_outputs passes 4/4 and asahi_g17_qos_capacity passes, including an_id_given_back_early_is_given_back_once.
  • The hardware rows (J700, J714s) are still listed under "Not yet".

@DjDeveloperr

DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Update, J773g (M4 Mac mini, G16G) at b04ba72e86ee: PASS, no regression found. The rerun with one worker and no cross_instance groups ran clean on both kernels: 0 GPU faults, 0 recoveries, and no fail-stop. Since 43f3740cfbd0, only two test scripts changed (tools/asahi/g17-admission-order-tests.py and the asahi-m4 command-stream selftest), so the kernel code is the same.

How it was run: two guarded one-shots on the default cmdline, the same day on the same Mac.

CTS: dEQP-VK.synchronization* minus multi_queue (#3201) and minus cross_instance, every 4th case (11,834 including api.smoke), one worker.

control (main) candidate (main + this PR)
result 11,834 recorded in 221 s: 9,156 pass, 2,677 not supported, 1 fail 11,834 recorded in 220 s: 9,154 pass, 2,677 not supported, 3 fail
GPU recoveries / hang kills 0 / 0 0 / 0
gpubench sync.signal d1 164.3 µs 166.7 µs
gpubench compute.light d1 / d4 114.4 / 46.7 µs 111.3 / 46.2 µs

All four fails are different cases from the same op.single_queue family: an SSBO written by compute or fragment and read by a geometry or vertex stage.

  • control: synchronization.op.single_queue.fence.write_ssbo_compute_indirect_read_ubo_texel_vertex.buffer_16384
  • candidate: synchronization2.op.single_queue.event.write_ssbo_compute_read_ssbo_geometry.buffer_262144_maintenance9, ….fence.write_ssbo_fragment_read_ssbo_geometry.buffer_262144_specialized_access_flag and ….timeline_semaphore.write_ssbo_compute_indirect_read_ubo_texel_vertex.buffer_16384_specialized_access_flag

None of them fails on its own: all four ran 25 times each on the stock kernel, 100/100 pass, with no kernel lines. I read them as the same flaky family on both arms, not something this PR adds. I didn't repeat them on the candidate kernel.

Other checks: api.smoke 8/8 on both. 0 GPU fault/IRQ error lines, 0 WARNING: lines and 0 failed units on both.

Not run: the cross_instance groups. They fault on main (#3201), so they can't tell anything about this PR on the J773g.

Both boots returned to the stock kernel, and the kits were removed from the Mac.


Earlier run, at 43f3740cfbd0:

J773g (M4 Mac mini, G16G) at 43f3740cfbd0: not a pass yet. The candidate's GPU fail-stopped during the sync CTS. Main faults on the same cases, so a single run can't pin it on this PR. A cleaner A/B follows in my next hold.

How it was run: two guarded one-shots on the default cmdline.

CTS: dEQP-VK.synchronization* with the multi_queue cases of #3201 excluded, every 4th case (27,487), plus api.smoke, with 3 parallel workers.

control (main) candidate (main + this PR)
result all 27,487 recorded: 14,138 pass, 13,317 not supported, 32 fail stopped at 19,886: 7,845 pass, 11,747 not supported, 292 fail, 1 crash, 1 device lost
GPU recoveries 2, then the run finished (514 s) 4, then "administrative command deadline exceeded … fail-stop (ETIMEDOUT)" at 156 s

Both boots lost the device on the same early case, synchronization.cross_instance.dedicated.write_image_vertex_read_blit_image.image_128x128_r16_uint_timeline_semaphore_dma_buf. They show the same fault signature: all 8 fault banks read unmapped level 1 unit 0x1 at va 0x0–0x380.

  • On main the driver recovered twice and went on.
  • On the candidate it recovered 4 times and then fail-stopped. The extra fails are almost all cross_instance cases lost around those recoveries (173 suballocated, 105 dedicated).

So these faults come from the base, the cross-instance external-semaphore tests, as in #3201. Whether this PR makes them escalate can't be told from one run per arm.

Other checks:

  • api.smoke: 8/8 on both, before the CTS.
  • gpubench sync.signal and compute.light: control ok (sync.signal d1 164.2 µs, compute.light d1 113.7 / d4 46.5). On the candidate they couldn't run after the fail-stop.
  • 0 DART/IOMMU faults and 0 WARNING: lines on both.

Not yet: the same subset on both kernels with one worker and without the cross_instance groups, which fault on main. After that, the cross_instance groups on their own, run several times per arm. That's in my next hold.

…d the sync bound

Two host tests compile driver files against stand-ins that lacked what
this branch's earlier commits use. g17-admission-order-tests.py builds
release_queue(), which now calls Context::release_unpublished(); its
stand-in Context gets it as a no-op, since the fixture models slot holds,
not identities. test-command-stream.py builds g16/command.rs, whose
MAX_SYNCS now names file::MAX_SYNCS_PER_SUBMISSION; its stand-in file
module gets the constant.

No runtime code changes.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J700 (MacBook Neo, A18 Pro, G17P) at 7121f2ebd2f8: PASS.

  • Kernel: 7.3.0-neo-rows3, built from main dbfbced70b31 with this head merged unchanged, plus drm/asahi: g17: name the owning process when a compute publication gives up #3240 and iommu/apple-dart: fail closed when an unmap's TLB retirement fails #3310, which touch other files. It used the Neo's 7.3.0-41 config and was booted one-shot twice. The running vmlinux and aurora.ko build IDs (c63915f98aca, dfa14493e160) matched the build.
  • Vulkan sync CTS subset: 6,050 Pass, 376 NotSupported, 0 Fail, 0 recoveries. This covers synchronization{,2}.{basic,smoke,timeline_semaphore,internally_synchronized_queues,none_stage}.* and api.external.{fence,semaphore}.*, 6,426 cases, with the system Mesa 26.3.0-30. The result is identical, case for case, to stock 7.3.0-41 with the same Mesa.
  • dup-outputs: PASS.
    • 1024, 2048 and 4096 outputs naming one timeline took 0.12, 0.20 and 0.44 ms (ratio 3.6), and every rising point from 1 to 4096 was waitable.
    • 4097 syncs were refused with nothing installed.
    • Stock 7.3.0-41 fails: 6.3, 24.5 and 78.4 ms (ratio 12.4), and it accepts 4097.
  • killed-jobs: PASS. Killed jobs held 0 execution contexts and 0 QoS IDs. Stock holds 12 and 12.
  • Kill and teardown stress: 60 deqp-vk sync clients were SIGKILLed at random points, followed by three killed-jobs rounds and a final client. All passed, with 0 GPU faults and 0 WARN or oops lines.
  • Kernel log, both boots: 0 GPU faults, 0 recoveries, 0 WARN/BUG lines. The only G17 lines are the "refused a submission" lines that dup-outputs' empty command streams are expected to cause.
  • Restore: each boot returned to stock 7.3.0-41, and the test files were removed, matching the pre-install snapshot.

@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 7121f2e once current hosted checks pass.

Checked: The merge-up type fix accepts the same KVVec that main now uses for parsed syncs. It changes the parameter type without changing coalescing order or the close path. The current-head J700 result matches stock on the sync CTS subset and passes duplicate outputs and kill/teardown stress.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 1, 2026
Keep main's execution_share_id() and this branch's release_unpublished()
next to each other in g17/context.rs. release_unpublished() releases the
execution identity through release_execution(), which on main goes
through the exec_share Use: a shared context only leaves its share, and
the last sharer releases the root.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Merged main (18edb08ad329) into this branch as fa5571a77bab, with a normal merge commit and no force push. The only conflict was in g17/context.rs, where main's new execution_share_id() and this branch's release_unpublished() were added at the same place. Both are kept. release_unpublished() calls release_execution(), which on main goes through the exec_share Use. That Use is idempotent (done flag), so a shared context only leaves its share and the last sharer releases the root. The other nine PR files merged cleanly, and the diff against main is the same 10 files.

Checks on fa5571a77bab (pc, defconfig + asahi.config, LLVM, layout-corrected bindgen):

  • modules_prepare drivers/gpu/drm/asahi/ built and linked asahi_core.o and aurora.o. The only Rust warnings are in files this PR doesn't touch.
  • tools/asahi/run-host-tests.py --only g17: 329/329 passed.
  • --only asahi-m4: 1/1 passed.

The J700 row at 7121f2eb predates main's exec_share change to context.rs, so a G17P row at this head is requested. An independent approval is still needed.

@github-actions github-actions Bot added ci-failing A check failed 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 Dec 2, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verdict: MERGE at fa5571a77bab once the J700 and J714s rows below pass at this head.
Blockers: none in the code.
Checked: the merge of main 18edb08a is a clean merge plus the one g17/context.rs conflict, fixed by keeping both functions: main's execution_share_id() and this PR's release_unpublished(). Against main, the net diff is line for line the one approved at 7121f2eb. Main's shared-execution code doesn't change what release_unpublished() relies on, because each release it calls runs at most once (exec_share::Use::release_execution(), ExecutionRoot::release(), QosLease::give_back(), release_render_id()). A later release from teardown or drop is therefore still safe. CI at this head: apple-build and KUnit asahi pass. host-tests was cancelled, so I ran the full host-test suite at this head in the CI's Ubuntu 24.04 image: 952/952 pass, including g17-admission-order-tests and the asahi-m4 selftests. No Apple material, no gates.

Rows still owed at this head: J700 and J714s, the Vulkan sync CTS subset vs base, the duplicate-timeline-output test, and a kill/teardown stress.

Evidence
  • git merge-tree --write-tree --merge-base=42169a041546 7121f2ebd2f8 18edb08ad329 conflicts only in g17/context.rs. Every other path is identical to the tree of fa5571a7.
  • The added and removed lines of 18edb08a..fa5571a7 are identical to those of 42169a04..7121f2eb (+213/-10, 10 files).
  • tools/asahi/run-host-tests.py --jobs 20 at fa5571a7 (tree 6669eacd), rustc 1.96.0, Python 3.14.10, no network: 952/952 passed in 327 s.

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 2, 2026

@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 fa5571a

Checked: The merge keeps both the execution-share accessor and unpublished-context teardown. A published context still takes the existing release path. An unpublished shared context releases only its own Use, whose done flag prevents double release; the last share releases the root. The sync bound and output coalescing are unchanged by the conflict resolution. The author reported 329/329 G17 host checks and the ABI suite passing at this head.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 3, 2026

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

The merge crosses a binary replacement on the same syncobj. The parser accepts timeline 9, binary, then timeline 7 for one handle. Today the middle output replaces the fence, so the final timeline ends at 7. Coalescing timeline outputs across that replacement moves point 9 to the last output and publishes 9 instead. Treat a same-object binary output as a boundary when coalescing.

A binary output replaces the syncobj's fence, chain and points. With
timeline 9, binary, then timeline 7 on one syncobj the last point is 7,
but merging the two timeline outputs across the binary one moved point 9
to the last output and published 9.

Keep the binary outputs in the merge list as boundaries. Add a KUnit
case, and a host test that checks every list of up to five outputs on
two syncobjs against installing each output in order.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Right, that was a real bug. 0c4976b9ffb5 keeps the binary outputs in the merge list as boundaries, so timeline 9, binary, timeline 7 on one syncobj is left alone and ends at 7; timeline outputs on either side of the binary one still merge. Repeated binary outputs, a cumulative anchor and inputs that name the same syncobj are not affected.

There is a KUnit case for it, and a new host test (g17-submit-outputs-tests.py) that compares every list of up to five outputs on two syncobjs with installing each in order; it fails on fa5571a77bab. run-host-tests.py --only g17 passes 331/331, and the driver builds for arm64 with KUnit on. The J700 and J714s rows are owed at this head.

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

The binary replacement case from the previous review is fixed. A binary output ends the timeline group for that syncobj and leaves other syncobjs independent. I ran the exact-head submit-output host test: 6/6 passed, including the comparison with in-order installation of short output lists. Restoring the old merge across binary outputs fails both boundary tests. Hardware rows remain pending.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026

This branch has not been deployed

No deployments
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:all 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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants