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: f703dfd1bb - radeonsi: add gfx12

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
(cherry picked from commit e4b3848fde)
This commit is contained in:
Marek Olšák 2024-07-30 13:15:48 -04:00 committed by Eric Engestrom
parent d8282badb0
commit 4b7fda129e
2 changed files with 1 additions and 2 deletions

View file

@ -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

View file

@ -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));