From 05ca6e24784f142a6442e306f2b82516d03264cc Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Fri, 7 Jun 2024 21:51:26 +0200 Subject: [PATCH] amd/common: set COMPUTE_STATIC_THREAD_MGMT_SE2-3 correctly on gfx10-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a hole between SE1 and SE2 occupied by COMPUTE_TMPRING_SIZE. Fixes: 3c8b48e310d ("ac,radeonsi: add a function to initialize compute preambles") Reviewed-by: Marek Olšák Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/common/ac_cmdbuf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_cmdbuf.c b/src/amd/common/ac_cmdbuf.c index 60b816a8966..a94302531f0 100644 --- a/src/amd/common/ac_cmdbuf.c +++ b/src/amd/common/ac_cmdbuf.c @@ -58,10 +58,14 @@ gfx10_init_compute_preamble_state(const struct ac_preamble_state *state, ac_pm4_set_reg(pm4, R_00B834_COMPUTE_PGM_HI, S_00B834_DATA(info->address32_hi >> 8)); - for (unsigned i = 0; i < 4; ++i) + for (unsigned i = 0; i < 2; ++i) ac_pm4_set_reg(pm4, R_00B858_COMPUTE_STATIC_THREAD_MGMT_SE0 + i * 4, i < info->max_se ? compute_cu_en : 0x0); + for (unsigned i = 2; i < 4; ++i) + ac_pm4_set_reg(pm4, R_00B864_COMPUTE_STATIC_THREAD_MGMT_SE2 + (i - 2) * 4, + i < info->max_se ? compute_cu_en : 0x0); + ac_pm4_set_reg(pm4, R_00B890_COMPUTE_USER_ACCUM_0, 0); ac_pm4_set_reg(pm4, R_00B894_COMPUTE_USER_ACCUM_1, 0); ac_pm4_set_reg(pm4, R_00B898_COMPUTE_USER_ACCUM_2, 0);