From 1d37a56a7546c61f2be686155857fc7be1055cdb Mon Sep 17 00:00:00 2001 From: Mel Henning Date: Wed, 15 Apr 2026 18:54:43 -0400 Subject: [PATCH] nvk: Add a wfi for blackwell in CmdDispatchIndirect This fixes CTS flakes in several tests, for example: dEQP-VK.synchronization.signal_order.shared_binary_semaphore.write_copy_buffer_read_ssbo_compute_indirect.buffer_262144_opaque_fd Fixes: 1c77a6f049d ("nvk: Don't emit MME FIFO config on Blackwell+") Reviewed-by: Mary Guillemard (cherry picked from commit 1e114e2dce16dc0a3bda0be70448f105f81e4d3f) Part-of: --- .pick_status.json | 2 +- src/nouveau/vulkan/nvk_cmd_dispatch.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 098d175db06..613f0d0e811 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -284,7 +284,7 @@ "description": "nvk: Add a wfi for blackwell in CmdDispatchIndirect", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1c77a6f049da4901682cac62f23d53d60eb9d22d", "notes": null diff --git a/src/nouveau/vulkan/nvk_cmd_dispatch.c b/src/nouveau/vulkan/nvk_cmd_dispatch.c index b3a75ddc5a2..76967b81c3b 100644 --- a/src/nouveau/vulkan/nvk_cmd_dispatch.c +++ b/src/nouveau/vulkan/nvk_cmd_dispatch.c @@ -564,8 +564,18 @@ nvk_CmdDispatchIndirect(VkCommandBuffer commandBuffer, struct nv_push *p; if (nvk_cmd_buffer_compute_cls(cmd) >= TURING_COMPUTE_A) { p = nvk_cmd_buffer_push(cmd, 14); - if (nvk_cmd_buffer_compute_cls(cmd) < BLACKWELL_COMPUTE_A) + if (nvk_cmd_buffer_compute_cls(cmd) < BLACKWELL_COMPUTE_A) { P_IMMD(p, NVC597, SET_MME_DATA_FIFO_CONFIG, FIFO_SIZE_SIZE_4KB); + } else { + /* The line in the other side of the if causes an implicit wfi + * due to the subc switch which we apparently rely on for + * correctness (!?). Anyway, to prevent issues on blackwell + * we need to wfi here too. + * TODO: delete this + */ + P_IMMD(p, NVC86F, WFI, 0); + } + if (nvk_cmd_buffer_compute_cls(cmd) >= AMPERE_COMPUTE_B) P_1INC(p, NVC7C0, CALL_MME_MACRO(NVK_MME_DISPATCH_INDIRECT)); else