Skip to content

drm/asahi: g17: do not report a closed client's unfinished work as a lost device - #1925

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/g17-quiet-closed-client-teardown
Nov 14, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/g17-quiet-closed-client-teardown

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

When a client closes its DRM file, or is killed, while one of its renders is still queued in the GPU, queue teardown waits two seconds for that render and then fails it with ETIMEDOUT. The kernel logged this as a render timeout and as a lost device of that client:

G17: render timeout slot ...: ... pass [0x0, 0x0], ... job list not empty
GPU work of a client failed (ETIMEDOUT, ..., client NAME[PID]); the client sees a lost device

The client is gone, so nothing can observe a lost device, and no running client loses its device. The lines only look like a GPU fault. Killing a client whose render waits behind another client's long ray-traversal pass produces them.

Change

  • The end of that teardown wait is treated like the other teardown errors of a closed client (ENOENT, ECANCELED): a debug message, and no timeout report for the group unless verbose fault reporting is on. From then on that closed client's other ETIMEDOUT failures are treated the same way.
  • Unchanged: a watchdog timeout of a client that is still there is reported as before, and so is the end of the wait for a client that only destroyed a queue.
  • Logging only. What happens to the work is the same.

Trade-off

The teardown cannot tell a render that was waiting its turn from one that was stuck. A client that is killed while its own render hangs therefore no longer leaves a warning. A hang that affects other clients is still reported through their watchdogs.

Testing

  • One new KUnit case in g17/status.rs. A full kernel build (Image, modules) with KUnit enabled compiles and links with this change; the case itself was not run.
  • The host test that runs the status code on a host model (tools/asahi/g15-input-error-tests.py) follows the new field and function and checks the rule; its control, mutation and old-revision modes pass.
  • MacBook Neo, one boot of a test build in which a test-only switch restores the old report: four clients killed in the middle of their renders, six times each way. With the old report three of the six logged the lost-device line; with the change none of the six logged any GPU driver line. Two 100-second four-client stress runs that end by killing their clients logged none either (both such runs did before).
  • The hardware run used this change before two review edits that do not alter default behaviour: the group's timeout report is kept when verbose fault reporting is on, and comments.

🤖 Generated with Claude Code

…lost device

When a client closes its DRM file while one of its renders is still in
the GPU, the queue teardown waits two seconds for that render and then
fails it with ETIMEDOUT. The failure was logged as a render timeout and
as a lost device of that client, although the client is gone and nothing
can observe it. Killing a client whose render was queued behind another
client's long ray-traversal pass could produce both lines.

Treat the end of that wait like the other teardown errors of a closed
client: a debug message, and no timeout report for the group unless
verbose fault reporting is on. From then on the closed client's other
ETIMEDOUT failures are treated the same way.

The teardown cannot tell a render that was waiting its turn from one
that was stuck, so a client killed while its own render hangs no longer
leaves a warning. A hang that affects other clients is still reported
through their watchdogs. A watchdog timeout of a client that is still
there is reported as before, and so is the end of the wait for a client
that only destroyed a queue.

The host test that runs the status code on a host model follows the new
field and function, and checks the rule: an open client still sees the
end of its teardown wait, and a closed client's timeout is reported
until such a wait has ended. One mutation covers the closed-client half.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr force-pushed the djdev/g17-quiet-closed-client-teardown branch from a6a9773 to b60e6ef Compare November 14, 2026 20:11
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Merging on green host tests, to be verified after the merge.

  • The change is logging only: it alters which failure of an already closed client is reported, not what happens to the work. Two independent reviews of the diff found no behaviour change.
  • Checked before the merge: the full host test set on this head (it includes the status model test this change updates, with its mutation and old-revision modes), a full kernel build with KUnit enabled, and on hardware the old and new report in one boot (lost-device line in three of six kill rounds before, none of six after; two four-client stress runs without such lines).
  • Not checked before the merge: the full Vulkan/GL conformance gate on this exact head. The hardware run used the kernel code of this change before two review edits that do not alter default behaviour.
  • After the merge: the next kernel candidate cut from this branch runs the full conformance gate and the multi-client stress row, which counts these lines explicitly. If either regresses because of this change, it is reverted.

🤖 Generated with Claude Code

@DjDeveloperr
DjDeveloperr merged commit be8d4cd into integration/aurora Nov 14, 2026
1 check passed
m0d16l14n1 added a commit to m0d16l14n1/linux that referenced this pull request Nov 15, 2026
…t-next

G17 stability: aurora-silicon#1926 watchdog reason, aurora-silicon#1925 closed-client teardown, aurora-silicon#1946 kept-graph
pool pages, aurora-silicon#1948 reclaim idle render pools; configs: aurora-silicon#1938, aurora-silicon#1939 shared defaults.
@RyanTheTide
RyanTheTide deleted the djdev/g17-quiet-closed-client-teardown branch November 16, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant