From 58f6331eec66bc3bb2b3573d4b8a4a851a5c4cff Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 17 Feb 2022 13:24:20 -0800 Subject: [PATCH] turnip: Skip telling the kernel the BO list when we don't need any. In fencing, we sometimes do a dummy submit with no nr_cmds. If we don't have commands to execute, we don't need to pin or fence any BOs either. Part-of: --- src/freedreno/vulkan/tu_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c index 9e46b08a1f0..3be7a5ea240 100644 --- a/src/freedreno/vulkan/tu_drm.c +++ b/src/freedreno/vulkan/tu_drm.c @@ -1023,7 +1023,7 @@ tu_queue_submit_locked(struct tu_queue *queue, struct tu_queue_submit *submit) .flags = flags, .queueid = queue->msm_queue_id, .bos = (uint64_t)(uintptr_t) queue->device->bo_list, - .nr_bos = queue->device->bo_count, + .nr_bos = submit->entry_count ? queue->device->bo_count : 0, .cmds = (uint64_t)(uintptr_t)submit->cmds, .nr_cmds = submit->entry_count, .in_syncobjs = (uint64_t)(uintptr_t)submit->in_syncobjs,