From e63b744d704411993c9ea3bfdb407d5908a2d200 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Wed, 11 Nov 2026 11:53:11 +1100 Subject: [PATCH] drm/asahi: g17: keep an exited owner's compute backing until another VM needs the queue detach_exited_owner() marked every idle compute queue whose owner exited for fresh backing, so each short-lived process's queue went through a pool release and re-arm right after its owner left. On the Neo (G17P), a long Vulkan CTS session then retired a compute command on its completion record without a completion stamp, and from there every later client's work timed out (ETIMEDOUT) until reboot. The per-VM tie does not need the eager release: pool_serves() already refuses to bind the backing for any VM other than the one it served, and the QID-pressure path marks a queue serving another VM for fresh backing before that VM may use it. Keep the exited owner's backing tied to its VM and leave the release to that path. Same order on the Neo (fresh boot, 36,127-case CTS slice with 4 deqp-vk processes, then 30 runs of three timeline semaphore one_to_n cases): integration fc0a0695 lost the device in the slice and in 8 of the 30 runs; with this change, 5 of 5 sessions had no device loss and no ETIMEDOUT. Fixes: b3b02e27df5c ("drm/asahi: g17: Fix compute scratch leaking across processes on queue reuse") Assisted-by: LLM Signed-off-by: Ryan Murray --- drivers/gpu/drm/asahi/g17/queue/compute.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/asahi/g17/queue/compute.rs b/drivers/gpu/drm/asahi/g17/queue/compute.rs index 3e9d2002dafc3..0b8f4ac5ec4de 100644 --- a/drivers/gpu/drm/asahi/g17/queue/compute.rs +++ b/drivers/gpu/drm/asahi/g17/queue/compute.rs @@ -1912,8 +1912,10 @@ impl Queue { } let binding = self.binding.take()?; self.retained_owner = Some(binding.context.retain_firmware_pages()); - // The backing served the exited VM only: give it back for fresh backing. - self.needs_fresh_backing = true; + // The backing stays tied to the exited VM (`pool_serves` refuses every other VM). It + // is given back only when another VM needs this queue (`require_fresh_backing` under + // QID pressure), not at every owner exit: releasing and re-arming the pool of each + // exited owner's idle queue left a later command retired without a completion stamp. Some(binding) } /// An idle retained queue whose USC backing may be given back.