From 7481c4be583493374925dbe53703f992616ce91c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 3 Mar 2020 18:40:50 -0500 Subject: [PATCH] radeonsi: add a bug workaround for NGG - LATE_ALLOC_GS Cc: 19.3 20.0 Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_shaders.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index ebb3fa30b88..448ea8c732b 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1236,6 +1236,12 @@ static void gfx10_shader_ngg(struct si_screen *sscreen, struct si_shader *shader else late_alloc_wave64 = (num_cu_per_sh - 2) * 4; + /* Limit LATE_ALLOC_GS for prevent a hang (hw bug). */ + if (sscreen->info.family == CHIP_NAVI10 || + sscreen->info.family == CHIP_NAVI12 || + sscreen->info.family == CHIP_NAVI14) + late_alloc_wave64 = MIN2(late_alloc_wave64, 64); + si_pm4_set_reg(pm4, R_00B204_SPI_SHADER_PGM_RSRC4_GS, S_00B204_CU_EN(0xffff) | S_00B204_SPI_SHADER_LATE_ALLOC_GS_GFX10(late_alloc_wave64)); -- 2.30.2