Repository navigation
drm/asahi: let a G17 render queue keep 32 commands in flight - #497
Merged
DjDeveloperr merged 1 commit intoOct 27, 2026
Merged
Conversation
A logical render queue admitted 16 commands at a time, although its pair has command records (TA and fragment descriptors, configuration and timestamp slots) for 32. At depth the firmware runs the renders already announced when it starts a batch, then writes their completions one after another before it starts the next, so the window bounded every batch: at render depth 32 the median render ran in a batch of 8, at most 14, and the fixed cost of each batch edge fell on few renders. Admit as many commands as a pair has records; the scheduler's credits follow. At depth 32 and 64 the median render now runs in a batch of 11 and 15, at most 32. Each pair keeps a Generation per command in flight, 16 more of them, about 1.75 MiB more per render queue. A build-time check keeps the depth within the records. Measured on Neo in one boot, 16 against 32 commands, alternating, three rounds (us per submission, medians): render.light tri, depth 32 30.41 -> 29.50 render.light tri, depth 64 30.34 -> 29.38 Shallower depths, several queues or processes and the GPU time of each render are unchanged within run-to-run spread.
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.
A logical G17 render queue admitted 16 commands at a time, although its pair already has command records (TA and fragment descriptors, configuration and timestamp slots) for RECORDS = 32. At depth, the firmware runs the renders already announced when it starts a batch, then writes their completions one after another before the next batch. The 16-command window therefore capped each batch: at render depth 32 the median render ran in a batch of 8, at most 14, and the fixed cost of each batch edge fell on few renders.
RENDER_DEPTH= 32 =RECORDS; the render scheduler's credits follow it.DEPTH <= RECORDScheck in render memory: every unretired render of a pair holds its own command record.RENDER_DEPTHwas checked:Measurements
Neo, one boot, 16 against 32 commands, alternating, three rounds (µs per submission, medians):
Depth 1/8/16, several queues (depth 2/8) and several processes (depth 2, rechecked over five rounds: −0.2%) are unchanged within run-to-run spread. The GPU time of each render is identical. At depth 32/64 the median render now runs in a batch of 11/15, at most 32; with 16 commands it was 8, at most 14.
An earlier trial with 32 commands showed batches collapsing to 3. That run had a CPU thread polling the completion-stamp lines; without it the collapse doesn't reproduce.
Testing