From 56d84fb02f4676b0cf0abca6e5e28923ffa5c1f5 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: (cherry picked from commit c56c746b718d518ddaea687a229d2815d04d1314) --- .pick_status.json | 2 +- src/amd/vulkan/radv_cs.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 59cdfda0662..76c10532e27 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -8674,7 +8674,7 @@ "description": "radv: Don't use EVENT_WRITE_EOS on GFX7", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/radv_cs.c b/src/amd/vulkan/radv_cs.c index 5672c9b7dc8..2a2d444fa57 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 radeon_cmdbuf *cs, enum amd_gfx_level gfx_le 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;