From 0ab24a2f2482460a91a00ff030ebd9763365c6a6 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 3 Apr 2026 17:33:26 +0300 Subject: [PATCH] anv: fix debug printfs on hang Signed-off-by: Lionel Landwerlin Fixes: 0932d0c7e0 ("anv/xe: rework set_lost handling in xe_exec_ioctl()") Reviewed-by: Kenneth Graunke (cherry picked from commit c0c324fcb21023e6d7a838d0120c75bfa10b5e7c) Part-of: --- .pick_status.json | 2 +- src/intel/vulkan/xe/anv_batch_chain.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index a6014bc9200..b01de679177 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3974,7 +3974,7 @@ "description": "anv: fix debug printfs on hang", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0932d0c7e0158544261dd88de30b939aa2ddd207", "notes": null diff --git a/src/intel/vulkan/xe/anv_batch_chain.c b/src/intel/vulkan/xe/anv_batch_chain.c index d63d5ad5e3c..f1b9b8f2ec7 100644 --- a/src/intel/vulkan/xe/anv_batch_chain.c +++ b/src/intel/vulkan/xe/anv_batch_chain.c @@ -142,8 +142,11 @@ xe_exec_ioctl_impl(struct anv_queue *queue, struct drm_xe_exec *exec, struct anv_device *device = queue->device; int ret = xe_gem_exec_ioctl(device->fd, device->info, exec); - if (ret) + if (ret) { + if (INTEL_DEBUG(DEBUG_SHADER_PRINT)) + vk_check_printf_status(&device->vk, &device->printf); return vk_queue_set_lost(&queue->vk, "%s(%d) failed: %m", func, line); + } return VK_SUCCESS; }