[Intel-gfx] [PATCH 68/68] XXX: drm/i915: Unexplained workarounds

Ben Widawsky benjamin.widawsky at intel.com
Fri Aug 22 05:12:31 CEST 2014


1. Always force invalidate. This doesn't fix any bugs, but it makes the
time to failure longer.

2. Make TLB validation explicit

I can't say I've spent too much time with these, however, it seems if I
use each individually, I get no observable stability improvement. When I
use them together though, I do (still hangs in the end)
---
 drivers/gpu/drm/i915/i915_gem_context.c | 2 ++
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 7d81904..195bc0b 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -813,6 +813,8 @@ static int do_switch_rcs(struct intel_engine_cs *ring,
 		 * die because future work may end up depending on valid address
 		 * space. This means we must enforce that a page table load
 		 * occur when this occurs. */
+	} else if (IS_GEN8(ring->dev) && USES_FULL_PPGTT(ring->dev)) {
+		hw_flags |= MI_FORCE_RESTORE;
 	} else if (test_and_clear_bit(ring->id, &to->vm->pd_reload_mask))
 		hw_flags |= MI_FORCE_RESTORE;
 
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 117543e..b6ed038 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -645,7 +645,7 @@ static int init_render_ring(struct intel_engine_cs *ring)
 			   _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_EXPLICIT));
 
 	/* WaBCSVCSTlbInvalidationMode:ivb,vlv,hsw */
-	if (IS_GEN7(dev))
+	if (IS_GEN7(dev) || IS_GEN8(dev))
 		I915_WRITE(GFX_MODE_GEN7,
 			   _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_EXPLICIT) |
 			   _MASKED_BIT_ENABLE(GFX_REPLAY_MODE));
-- 
2.0.4




More information about the Intel-gfx mailing list