summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSonny Jiang <[email protected]>2018-10-19 16:16:41 -0400
committerMarek Olšák <[email protected]>2018-10-19 16:16:57 -0400
commitbfb2b902464b1c493e4bfa1f3c2da065a964ac85 (patch)
tree0ce954575f3b9606df0a6b50f6162224ff0a2cc4
parentf91f9bab83dd87034acc520d51d2f9f84984cec6 (diff)
radeonsi: Disable clear_state with radeon kernel driver
Signed-off-by: Sonny Jiang <[email protected]> Tested-by: Michel Dänzer <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c6
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 46cf37567f9..7bc34498cf4 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -993,8 +993,10 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
}
/* The mere presense of CLEAR_STATE in the IB causes random GPU hangs
- * on SI. */
- sscreen->has_clear_state = sscreen->info.chip_class >= CIK;
+ * on SI. Some CLEAR_STATE cause asic hang on radeon kernel, etc.
+ * SPI_VS_OUT_CONFIG. So only enable CI CLEAR_STATE on amdgpu kernel.*/
+ sscreen->has_clear_state = sscreen->info.chip_class >= CIK &&
+ sscreen->info.drm_major == 3;
sscreen->has_distributed_tess =
sscreen->info.chip_class >= VI &&
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 176ec749148..36dce381539 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4899,8 +4899,9 @@ static void si_init_config(struct si_context *sctx)
bool has_clear_state = sscreen->has_clear_state;
struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state);
- /* Only SI can disable CLEAR_STATE for now. */
- assert(has_clear_state || sscreen->info.chip_class == SI);
+ /* SI, radeon kernel disabled CLEAR_STATE. */
+ assert(has_clear_state || sscreen->info.chip_class == SI ||
+ sscreen->info.drm_major != 3);
if (!pm4)
return;