drm/i915/gt: Disable arbitration around Braswell's pdp updates
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Jan 2021 10:57:32 +0000 (10:57 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Jan 2021 23:07:38 +0000 (23:07 +0000)
Braswell's pdp workaround is full of dragons, that may be being angered
when they are interrupted. Let's not take that risk and disable
arbitration during the update.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210111105735.21515-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_execlists_submission.c

index 52c1fe6..10e9940 100644 (file)
@@ -2539,6 +2539,14 @@ static int emit_pdps(struct i915_request *rq)
         * GPU hangs to forcewake errors and machine lockups!
         */
 
+       cs = intel_ring_begin(rq, 2);
+       if (IS_ERR(cs))
+               return PTR_ERR(cs);
+
+       *cs++ = MI_ARB_ON_OFF | MI_ARB_DISABLE;
+       *cs++ = MI_NOOP;
+       intel_ring_advance(rq, cs);
+
        /* Flush any residual operations from the context load */
        err = engine->emit_flush(rq, EMIT_FLUSH);
        if (err)
@@ -2564,7 +2572,8 @@ static int emit_pdps(struct i915_request *rq)
                *cs++ = i915_mmio_reg_offset(GEN8_RING_PDP_LDW(base, i));
                *cs++ = lower_32_bits(pd_daddr);
        }
-       *cs++ = MI_NOOP;
+       *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
+       intel_ring_advance(rq, cs);
 
        intel_ring_advance(rq, cs);