Repository navigation
drm/asahi: g17: take a context's render pool identity when it is created - #1981
Merged
Merged
Conversation
A render pool identity is one of 127, taken when a queue's render pool is built at its first render. A render graph that the firmware may still link from a queue's work list stays allocated until the firmware stops, and keeps its identity until then. Once such graphs hold the identities that live queues need, a queue's first render is refused: it waits for render capacity, fails, and the client sees a lost device. On the A18 Pro, take the identity when the context is created. Open queues hold at most 58 identities, so graphs kept until the firmware stops can hold up to 69 before a new queue is refused. Past that, creating a queue fails with EBUSY after waiting up to two seconds, so the application gets an error from the call that creates the queue, while running clients are not affected. A refused render pool placement keeps the identity for the next attempt; a creator that waits for a closing queue holds none, and a closed context gives its identity back when it is reclaimed. The M4 Pro and Max keep taking the identity at the first render, before the pool's backing is placed, as before; M5 GPUs use their own identities. Signed-off-by: Diljit Singh <[email protected]>
This was referenced Nov 15, 2026
DjDeveloperr
marked this pull request as ready for review
November 16, 2026 07:33
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, and every render pool has one of 127 identities. The driver takes the identity when it builds the pool, at the queue's first render. A render graph that the firmware may still link from a queue's work list stays allocated until the firmware stops, and keeps its pool's identity until then. Once such graphs hold the identities that live queues need, a queue's first render is refused: it waits up to 30 seconds for render capacity, fails, and the client sees a lost device in a later submission.
Change
Limit
Kept render graphs still hold their identities and pools until the firmware stops. This change moves the refusal to queue creation; it does not free them. On the A18 Pro every queue now holds an identity, including queues that never render.
Testing
driver code is this PR's base, plus test-only switches (not part of this PR) that count a fixed number
of render pool identities as held and restore taking the identity at the first render.
identities equalled open queues in every snapshot, up to 57 for 57 under three dEQP-EGL processes.
case); no lost device, no GPU errors in the kernel log, the desktop unaffected. The case itself
fails because it needs 32 contexts;
the process lost its device.
dEQP-EGL multi-context cases in one and in two and three processes at once; a two-client run) gave the
same results as the unchanged driver: no lost devices, and only the queue and address-space
refusal messages that the unchanged driver also logs when those steps overfill the queues.
left none; the identities of their clients came back), a creator waiting for a closing queue, and
the M4 Pro and Max.
🤖 Generated with Claude Code