From c56c746b718d518ddaea687a229d2815d04d1314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Mon, 1 Sep 2025 15:00:39 +0200 Subject: [PATCH] radv: Don't use EVENT_WRITE_EOS on GFX7 EOS events are buggy on GFX7 and can cause hangs when used together in the same IB with CP DMA packets that use L2. While we don't use the L2 for CP DMA copies, we still use it with CP DMA prefetches, so the issue needs to be mitigated. As a mitigation, avoid using EVENT_WRITE_EOS and prefer to use the BOTTOM_OF_PIPE event instead of PS_DONE/CS_DONE, which should be close enough. Cc: mesa-stable Part-of: --- src/amd/vulkan/radv_cs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_cs.c b/src/amd/vulkan/radv_cs.c index a8549a4779a..1c801a6f9c7 100644 --- a/src/amd/vulkan/radv_cs.c +++ b/src/amd/vulkan/radv_cs.c @@ -26,6 +26,10 @@ radv_cs_emit_write_event_eop(struct radv_cmd_stream *cs, enum amd_gfx_level gfx_ return; } + /* EOS events may be buggy on GFX7, prefer not to use them. */ + if (gfx_level == GFX7 && (event == V_028A90_CS_DONE || event == V_028A90_PS_DONE)) + event = V_028A90_BOTTOM_OF_PIPE_TS; + const bool is_mec = qf == RADV_QUEUE_COMPUTE && gfx_level >= GFX7; unsigned op = EVENT_TYPE(event) | EVENT_INDEX(event == V_028A90_CS_DONE || event == V_028A90_PS_DONE ? 6 : 5) | event_flags;