From bca75a8484e1050596d0cd742baec926271d9659 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Wed, 17 Sep 2025 15:03:56 -0700 Subject: [PATCH] anv/i915: bring info->no_hw handling to anv_gem_execbuffer() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every single caller does the same check. Reviewed-by: José Roberto de Souza Reviewed-by: Rohan Garg Signed-off-by: Paulo Zanoni Part-of: --- src/intel/vulkan/i915/anv_batch_chain.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/intel/vulkan/i915/anv_batch_chain.c b/src/intel/vulkan/i915/anv_batch_chain.c index 9390f475bdf..2eb321ed881 100644 --- a/src/intel/vulkan/i915/anv_batch_chain.c +++ b/src/intel/vulkan/i915/anv_batch_chain.c @@ -678,6 +678,9 @@ anv_gem_execbuffer(struct anv_device *device, DRM_IOCTL_I915_GEM_EXECBUFFER2_WR : DRM_IOCTL_I915_GEM_EXECBUFFER2; + if (unlikely(device->info->no_hw)) + return 0; + do { ret = intel_ioctl(device->fd, request, execbuf); } while (ret && errno == ENOMEM); @@ -740,8 +743,7 @@ i915_queue_exec_async(struct anv_async_submit *submit, ANV_RMV(bos_gtt_map, device, execbuf.bos, execbuf.bo_count); - int ret = queue->device->info->no_hw ? 0 : - anv_gem_execbuffer(queue->device, &execbuf.execbuf); + int ret = anv_gem_execbuffer(queue->device, &execbuf.execbuf); if (ret) result = vk_queue_set_lost(&queue->vk, "execbuf2 failed: %m"); @@ -804,8 +806,7 @@ i915_companion_rcs_queue_exec_locked(struct anv_queue *queue, ANV_RMV(bos_gtt_map, device, execbuf.bos, execbuf.bo_count); - int ret = queue->device->info->no_hw ? 0 : - anv_gem_execbuffer(queue->device, &execbuf.execbuf); + int ret = anv_gem_execbuffer(queue->device, &execbuf.execbuf); if (ret) { anv_i915_debug_submit(&execbuf); result = vk_queue_set_lost(&queue->vk, "execbuf2 failed: %m"); @@ -963,15 +964,14 @@ i915_queue_exec_locked(struct anv_queue *queue, }; query_pass_execbuf.batch_start_offset += calc_batch_start_offset(pass_batch_bo); - int ret = queue->device->info->no_hw ? 0 : - anv_gem_execbuffer(queue->device, &query_pass_execbuf); + int ret = anv_gem_execbuffer(queue->device, &query_pass_execbuf); if (ret) result = vk_queue_set_lost(&queue->vk, "execbuf2 failed: %m"); } ANV_RMV(bos_gtt_map, device, execbuf.bos, execbuf.bo_count); - if (result == VK_SUCCESS && !queue->device->info->no_hw) { + if (result == VK_SUCCESS) { if (anv_gem_execbuffer(queue->device, &execbuf.execbuf)) { anv_i915_debug_submit(&execbuf); result = vk_queue_set_lost(&queue->vk, "execbuf2 failed: %m");