Mesa (20.3): radeonsi: disable WGP mode on gfx10.3 to prevent hangs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 3 17:59:31 UTC 2020


Module: Mesa
Branch: 20.3
Commit: 1578dde278d4db8727ce6125eb80ec291bda3c74
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1578dde278d4db8727ce6125eb80ec291bda3c74

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Nov 25 19:51:42 2020 -0500

radeonsi: disable WGP mode on gfx10.3 to prevent hangs

I think that reducing the CU mask to 1 disabled CU per SA broke the WGP mode
on VanGogh, causing a hang. To be sure, disable it on all chips.

Fixes: 9538b9a68ed - radeonsi: add support for Sienna Cichlid

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
(cherry picked from commit 69c927debeb705ec46b50d8e5ddfacb81264b244)

---

 .pick_status.json                               | 2 +-
 src/gallium/drivers/radeonsi/si_state_shaders.c | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index f45ec88836e..6c39d2c1285 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -679,7 +679,7 @@
         "description": "radeonsi: disable WGP mode on gfx10.3 to prevent hangs",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "9538b9a68ed9aa0f8a231d6bf681f6f0a2a9d341"
     },
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 66b8389669c..8df7b9b5fca 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1147,7 +1147,10 @@ static void gfx10_shader_ngg(struct si_screen *sscreen, struct si_shader *shader
       pm4, R_00B228_SPI_SHADER_PGM_RSRC1_GS,
       S_00B228_VGPRS((shader->config.num_vgprs - 1) / (wave_size == 32 ? 8 : 4)) |
          S_00B228_FLOAT_MODE(shader->config.float_mode) | S_00B228_DX10_CLAMP(1) |
-         S_00B228_MEM_ORDERED(1) | S_00B228_WGP_MODE(1) |
+         S_00B228_MEM_ORDERED(1) |
+         /* Disable the WGP mode on gfx10.3 because it can hang. (it happened on VanGogh)
+          * Let's disable it on all chips that disable exactly 1 CU per SA for GS. */
+         S_00B228_WGP_MODE(sscreen->info.chip_class == GFX10) |
          S_00B228_GS_VGPR_COMP_CNT(gs_vgpr_comp_cnt));
    si_pm4_set_reg(pm4, R_00B22C_SPI_SHADER_PGM_RSRC2_GS,
                   S_00B22C_SCRATCH_EN(shader->config.scratch_bytes_per_wave > 0) |



More information about the mesa-commit mailing list