From ec42f873e9f6dfc52bb5ea33c80c91780b236ce6 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Mon, 4 May 2026 15:49:01 +0200 Subject: [PATCH] tu: Fix tu_bo_make_zombie without queues Fixes: 9ee6a23b8fe ("tu: Support VK_KHR_maintenance9") Signed-off-by: Danylo Piliaiev Part-of: --- src/freedreno/vulkan/tu_knl_drm.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_knl_drm.cc b/src/freedreno/vulkan/tu_knl_drm.cc index 4e055d07ec5..68715b08221 100644 --- a/src/freedreno/vulkan/tu_knl_drm.cc +++ b/src/freedreno/vulkan/tu_knl_drm.cc @@ -87,7 +87,10 @@ tu_bo_make_zombie(struct tu_device *dev, struct tu_bo *bo) #endif vma->iova = bo->iova; vma->size = bo->size; - vma->fence = p_atomic_read(&dev->queues[0]->fence); + if (dev->queue_count[0] > 0) + vma->fence = p_atomic_read(&dev->queues[0]->fence); + else + vma->fence = -1; /* Must be cleared under the VMA mutex, or another thread could race to * reap the VMA, closing the BO and letting a new GEM allocation produce