radeonsi: Use max_se instead of num_se where appropriate
Scratch allocation needs to happen using max_se, otherwise there can be hangs. Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29202>
This commit is contained in:
committed by
Marge Bot
parent
db564a40b3
commit
18c736bcfc
@@ -1262,7 +1262,7 @@ void ac_get_scratch_tmpring_size(const struct radeon_info *info,
|
||||
|
||||
unsigned max_scratch_waves = info->max_scratch_waves;
|
||||
if (info->gfx_level >= GFX11)
|
||||
max_scratch_waves /= info->num_se; /* WAVES is per SE */
|
||||
max_scratch_waves /= info->max_se; /* WAVES is per SE */
|
||||
|
||||
/* TODO: We could decrease WAVES to make the whole buffer fit into the infinity cache. */
|
||||
*tmpring_size = S_0286E8_WAVES(max_scratch_waves) |
|
||||
|
||||
@@ -6295,7 +6295,7 @@ static void gfx10_init_gfx_preamble_state(struct si_context *sctx)
|
||||
|
||||
for (unsigned i = 0; i < 4; ++i)
|
||||
si_pm4_set_reg(pm4, R_00B858_COMPUTE_STATIC_THREAD_MGMT_SE0 + i * 4,
|
||||
i < sscreen->info.num_se ? compute_cu_en : 0x0);
|
||||
i < sscreen->info.max_se ? compute_cu_en : 0x0);
|
||||
|
||||
si_pm4_set_reg(pm4, R_00B890_COMPUTE_USER_ACCUM_0, 0);
|
||||
si_pm4_set_reg(pm4, R_00B894_COMPUTE_USER_ACCUM_1, 0);
|
||||
@@ -6305,7 +6305,7 @@ static void gfx10_init_gfx_preamble_state(struct si_context *sctx)
|
||||
if (sctx->gfx_level >= GFX11) {
|
||||
for (unsigned i = 4; i < 8; ++i)
|
||||
si_pm4_set_reg(pm4, R_00B8AC_COMPUTE_STATIC_THREAD_MGMT_SE4 + (i - 4) * 4,
|
||||
i < sscreen->info.num_se ? compute_cu_en : 0x0);
|
||||
i < sscreen->info.max_se ? compute_cu_en : 0x0);
|
||||
|
||||
/* How many threads should go to 1 SE before moving onto the next. Think of GL1 cache hits.
|
||||
* Only these values are valid: 0 (disabled), 64, 128, 256, 512
|
||||
@@ -6515,7 +6515,7 @@ static void gfx12_init_gfx_preamble_state(struct si_context *sctx)
|
||||
uint64_t border_color_va = sctx->border_color_buffer->gpu_address;
|
||||
uint32_t compute_cu_en = S_00B88C_SA0_CU_EN(sscreen->info.spi_cu_en) |
|
||||
S_00B88C_SA1_CU_EN(sscreen->info.spi_cu_en);
|
||||
unsigned num_se = sscreen->info.num_se;
|
||||
unsigned num_se = sscreen->info.max_se;
|
||||
unsigned color_write_policy, color_read_policy;
|
||||
enum gfx12_store_temporal_hint color_write_temporal_hint, zs_write_temporal_hint;
|
||||
enum gfx12_load_temporal_hint color_read_temporal_hint, zs_read_temporal_hint;
|
||||
|
||||
Reference in New Issue
Block a user