Repository navigation
drm/asahi: g17: fit a render pool for every queue on the A18 Pro - #1979
Merged
Merged
Conversation
DjDeveloperr
force-pushed
the
djdev/g17-client-private-usage
branch
from
November 15, 2026 11:21
031b06e to
a7c1149
Compare
This was referenced Nov 16, 2026
The driver places a client's private firmware-visible objects (compute timestamp pages, render generation state, register and fragment pages, compute binding pages) in a window of that client's address space. The capacity snapshot reports the shared window of render and compute pools but nothing about this one, so there is no way to tell how much of it a client uses. Count the bytes each address space has mapped in its private window, and report the most any one has had mapped at a time, with the window's size: client_private_bytes high_water=... total=... Signed-off-by: Diljit Singh <[email protected]>
Every queue that renders has a render pool, mapped in a window of the GPU address space that the pools of all clients share. On the A18 Pro that window holds about forty pools, while up to 58 queues can be open at once, one per GPU execution context. A render that finds no room first takes back the pools of idle queues; when more queues than that render at the same time, it waits for one of them to go idle, and fails if none does in time. The pool window and each client's private window above it share a span of the address space that is kept from userspace on every client. The private window holds only small objects (timestamp pages, generation state, register pages). On the A18 Pro, move the boundary: the pool window, 3264 MiB, has room for the smallest render pool of every queue, and the private window keeps 768 MiB. A compile-time check ties the pool window to the number of queues. The M4 Pro and Max keep the previous split, through a new UAT quirk; M5 GPUs place these objects elsewhere and are unaffected. Signed-off-by: Diljit Singh <[email protected]>
DjDeveloperr
force-pushed
the
djdev/g17-client-private-usage
branch
from
November 16, 2026 07:39
a7c1149 to
3deb91b
Compare
DjDeveloperr
marked this pull request as ready for review
November 16, 2026 07:39
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.
Every queue that renders has a render pool, mapped in a window of the GPU address space that the pools of all clients share. On the A18 Pro that window holds about forty pools, while up to 58 queues can be open at once, one per GPU execution context. A render that finds no room first takes back the pools of idle queues; when more queues than that render at the same time, it waits for one of them to go idle, and fails if none does in time: the client sees a lost device.
The pool window and each client's private window above it share a span of the address space that is kept from userspace on every client. The private window holds only small objects (timestamp pages, generation state, register pages).
Change
client_private_bytes high_water=... total=...).Limit
Compute pools share the pool window too. With every queue rendering, about 590 MiB remain for compute pools and the queues' small mappings; more busy compute queues than fit there still wait for room, as compute already does.
Testing
Rebased onto integration/aurora a163d7f (after #1977, #1981 and #1982 merged). The only conflict was in
g17/capacity.rs, where #1982's queue-share line now comes right before this PR'sclient_private_bytesline. That region now matches the kit the busy-row result above came from, byte for byte, and every other file's diff is the same as before. The logic is unchanged. Host tests: g17 32/32, asahi-m4 1/1. Fedora compile and link check OK, with no new warnings compared with the tip.🤖 Generated with Claude Code