Repository navigation
drm/asahi: halve G17 firmware notifications per render (first-kick word, retire on fragment) - #504
Merged
DjDeveloperr merged 2 commits intoOct 27, 2026
Conversation
An event pass considered a render pair only once both of its queues had posted a stamp notification, the tiling queue's and the fragment queue's. The tiling notification adds nothing a retirement needs: the fragment kick starts only after its fragment barrier saw the tiling stamp, and the observation still requires both stamps in memory to cover the pass. Recovery attribution reads the stamps, and parameter-buffer growth arrives as its own record. Select a pair, and decide that it needs a rescan, on the fragment queue's notification alone, through one helper with KUnit coverage. A pass whose only news is a tiling stamp no longer borrows the pair for an observation that cannot retire.
…only The tiling descriptor has a word at the position of the fragment descriptor's first-kick word, which the fragment stage sets only on a queue pair's first kick. The tiling setup set it on every kick. With it set, the firmware also notifies the host of the tiling queue's completion on every pass, so each render cost two firmware notifications, two mailbox interrupts and two event passes, while retirement needs only the fragment queue's notification (previous commit). Name the word first_kick and set it for ordinal 0 only, as for the fragment stage, on the A18 Pro firmware (26A428). The M4 Pro firmware (25G83) keeps the old value on every kick until it is measured there. Measured on Neo in one boot through a diagnostic switch that toggled only this word (3 rounds each, medians, us per submit): GPU mailbox IRQs per submit (render.light d32) 2.18 -> 1.10 render.light tri queue d1 105.26 -> 104.12 render.light tri queue d8 30.98 -> 29.30 render.light tri queue d32 29.67 -> 27.80 render.light tri queue d64 29.67 -> 27.78 render.light tri procs d2 52.12 -> 49.73 render.light tri queues d2 52.16 -> 49.65 compute.light queue d1 103.39 -> 104.08 sync.signal queues d2 timeline / binary 22.79 / 22.37 -> 22.61 / 22.61
RyanTheTide
added a commit
that referenced
this pull request
Oct 27, 2026
Pin the public #496/#504/#505 ports and distinguish shared retention fixes from firmware-qualified fault witnesses and descriptor changes. Document raw observability and the first-fault/idle-floor evidence needed before claiming achieved-clock, CTS or remaining performance parity. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
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.
The tiling (TA) work descriptor and the fragment work descriptor carry their completion fields in the same order: stamp address, auxiliary stamp address, stamp value, queue, one word that is always zero, then one more word. The fragment descriptor names that last word
first_kickand sets it only for its queue pair's first kick (ordinal == 0). The tiling descriptor left it unnamed (unk_8c2) and set it to 1 on every kick.With the word set on every kick, the firmware also notifies the host when each pass's tiling stage completes. Each render therefore cost two firmware notifications, two mailbox interrupts and two event passes, where retirement needs only the fragment queue's notification.
This series has two commits:
unk_8c2tofirst_kickand sets it for ordinal 0, like the fragment stage's word. This applies to the A18 Pro firmware (26A428). The M4 Pro firmware (25G83) keeps the old value on every kick until it is measured there.Measured effect
Neo (A18 Pro), on a core with AIC2 effective affinity (#447), same Mesa throughout.
GPU firmware notifications. Tracing-free census, 2 s of render.light d32, per submit:
macOS on the same machine takes about 1.04 GPU IRQs per render.
Production series against its base: one boot each, 3 rounds, medians in µs per submit.
The same word toggled alone by a diagnostic switch, in one boot (3 rounds alternating, medians), agrees:
For reference, macOS on the same machine does about 26.8 µs at d32 and 29.9 µs at d8.
Testing
All on the production build (A18 Pro firmware path):