Repository navigation
drm/asahi: G13/G14 host latency paths - #1500
Merged
Merged
Conversation
Add default-off early publication for ready, in-order G13/G14 jobs while retaining drm_sched ownership and bookkeeping. Route legacy GPU doorbells to a preallocated high-priority driver worker with a scoped utilization clamp. Annotate the fence-signalling section for lockdep. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A chain payload is an equivalent wait target once every older timeline point is signalled. Add a default-off arm that attaches new waits directly to the payload. This avoids dma_fence_chain irq_work propagation without altering the stored timeline. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Require the prior logical queue fence to be complete and each used firmware queue to have no pending commands before publishing from the submit ioctl. This keeps dependency-free d1 submissions on the fast path while deep or cross-engine bursts fall back to drm_sched before they can move the notifier target past an outstanding job. Add KUnit coverage for the rejected depth-192 case, serial round trips, dependency fallback, and the firmware slot/ring boundary. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Turn on inline publication from SUBMIT, the dedicated GPU event receive worker and the direct wait on ready timeline chain payloads. gpubench 0dae261, three boots per arm, us per submission (lower is better), all paths off vs on: M1 Pro (J316s) off on compute.light depth 1 284.4-287.4 141.2-165.1 -47% compute.light depth 2 73.9-89.4 59.3-60.1 -26% compute.light depth 4 42.3-45.6 40.5-41.1 -7% render.light depth 1 311.3-436.3 231.5-293.4 -27% sync.signal host 230.5-237.0 190.8-216.8 -13% compute.light 2 procs 81.3-91.2 57.6-59.2 -33% render.light 2 procs 139.7-165.6 103.6-113.7 -29% depth 16 and 4-process rows unchanged M2 (J413) off on compute.light depth 1 150.7-158.9 127.7-148.9 -11% render.light depth 1 226.0-231.5 214.0-217.4 -6% idle.wake 2 ms 262.3-263.3 240.4-248.5 -7% compute.light 2 procs 70.8-76.5 66.3-66.8 -10% render.light 2 procs 122.9-133.1 113.5-116.4 -10% depth 4/16 and 4-process rows unchanged gpubench-stress-vk (150 s, kernel log checked) passes 13/13 on two boots per machine with the paths on. The Vulkan CTS synchronization signal-order subset (96 cases) has no failures on the M1 Pro (24 pass, 72 not supported). glmark2 on the M2 is unchanged (6692-6716 off, 6675-6755 on). Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The module now owns the legacy GPU receive workqueue next to the cleanup queue; give the G15 probe/init host harness the same stub. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
G13/G14 host latency: publish a ready job from SUBMIT when the queue is idle (the previous logical-queue fence has signalled and the firmware queue is empty; anything else still goes through drm_sched), drain GPU events on a dedicated coalescing receive worker with a capacity hint, and wait on a timeline point's contained fence once all older points are complete. The last commit turns all three on.
gpubench 0dae261, test kernel = fleet58 + these commits, paths off vs on via module parameters, 3 interleaved one-shot boots per arm, us per submission (lower is better):
M1 Pro (J316s)
M2 (J413)
Inline publication alone (M2, 3 boots) gives compute depth 1 -8% and 2-process compute -9%; the full set is better on every row above.
vkQueueSubmit CPU time on the M1 Pro: compute depth 1 50.8-55.5 -> 27.0-35.9 us, render depth 16 21.0-27.6 -> 20.1-21.0 us; it rises at 4 processes (compute 15.6-17.6 -> 33.5-35.3 us) with unchanged throughput.
Gates with the paths on: gpubench-stress-vk --duration 150 --kernel-log 13/13 on two boots each on the M1 Pro and the M2 (queue.depth at 128+64 included), no GPU kernel log lines, Vulkan CTS dEQP-VK.synchronization.signal_order subset (96 cases) on the M1 Pro 0 failures on two boots (24 pass, 72 not supported), glmark2 on the M2 6692/6716/6702 off vs 6675/6755 on.
🤖 Generated with Claude Code