From 43d4bfd28534c96076c20ffa72d9bc2ec2caa94d Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Wed, 4 Mar 2015 16:00:21 -0800 Subject: [PATCH] i965/skl: Don't use PMA stall workaround According to the docs, it's not needed. The optimization is enabled by default, so all that we have to do is skip the workaround on gen9. Somehow this seems to fix hangs on several workloads. I am not really sure of the reason for that, but since it's the correct thing anyway, I will not lose sleep over it. Cc: 10.5 Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/i965/gen8_depth_state.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c b/src/mesa/drivers/dri/i965/gen8_depth_state.c index 5c56d51..3c8dd54 100644 --- a/src/mesa/drivers/dri/i965/gen8_depth_state.c +++ b/src/mesa/drivers/dri/i965/gen8_depth_state.c @@ -368,6 +368,10 @@ static void gen8_emit_pma_stall_workaround(struct brw_context *brw) { uint32_t bits = 0; + + if (brw->gen >= 9) + return; + if (pma_fix_enable(brw)) bits |= GEN8_HIZ_NP_PMA_FIX_ENABLE | GEN8_HIZ_NP_EARLY_Z_FAILS_DISABLE; @@ -400,7 +404,8 @@ gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt, return; /* Disable the PMA stall fix since we're about to do a HiZ operation. */ - write_pma_stall_bits(brw, 0); + if (brw->gen == 8) + write_pma_stall_bits(brw, 0); assert(mt->first_level == 0); assert(mt->logical_depth0 >= 1); -- 2.3.1