From 4b7fda129e581852117d35745873a796a3ba24e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 30 Jul 2024 13:15:48 -0400 Subject: [PATCH] radeonsi/gfx12: fix a GPU hang due to an invalid packet with window rectangles I guess incorrect packet interrupts have been enabled, so this started hanging. radeon_set_context_reg_seq shouldn't be used with gfx12_set_context_reg. Fixes: f703dfd1bb8 - radeonsi: add gfx12 Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: (cherry picked from commit e4b3848fdebf84b5d7ffaf113f5be8462d045eb6) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_state_viewport.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 81b7e952fa0..07fc8ac57f3 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -674,7 +674,7 @@ "description": "radeonsi/gfx12: fix a GPU hang due to an invalid packet with window rectangles", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f703dfd1bb8c22b6791dd95c7de270e176452b4b", "notes": null diff --git a/src/gallium/drivers/radeonsi/si_state_viewport.c b/src/gallium/drivers/radeonsi/si_state_viewport.c index 3487d097913..ba447961e89 100644 --- a/src/gallium/drivers/radeonsi/si_state_viewport.c +++ b/src/gallium/drivers/radeonsi/si_state_viewport.c @@ -746,7 +746,6 @@ static void si_emit_window_rectangles(struct si_context *sctx, unsigned index) gfx12_opt_set_context_reg(R_02820C_PA_SC_CLIPRECT_RULE, SI_TRACKED_PA_SC_CLIPRECT_RULE, rule); if (num_rectangles) { - radeon_set_context_reg_seq(R_028210_PA_SC_CLIPRECT_0_TL, num_rectangles * 2); for (unsigned i = 0; i < num_rectangles; i++) { gfx12_set_context_reg(R_028210_PA_SC_CLIPRECT_0_TL + i * 8, S_028210_TL_X(rects[i].minx) | S_028210_TL_Y(rects[i].miny));