diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-08-08 06:51:00 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-08-08 12:08:07 -0400 |
commit | a4a717010f4e8cacaa3f0cae8a22f25c39ae1d41 (patch) | |
tree | 7d603927f9da1b5e18c460cc7c69404a1107e078 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | c1e63f6df3d3e9e4d0da67f6c8aabdfbe592371f (diff) |
drm/i915: Unmask user interrupts writes into HWSP on snb/ivb/vlv/hsw
An oddity occurs on Sandybridge, Ivybridge and Haswell (and presumably
Valleyview) in that for the period following the GPU restart after a
reset, there are no GT interrupts received. From Ville's notes, bit 0 in
the HWSTAM corresponds to the render interrupt, and if we unmask it we
do see immediate resumption of GT interrupt delivery (via the master irq
handler) after the reset.
v2: Limit the w/a to the render interrupt from rcs
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107500
Fixes: c5498089463b ("drm/i915: Mask everything in ring HWSTAM on gen6+ in ringbuffer mode")
References: d420a50c21ef ("drm/i915: Clean up the HWSTAM mess")
Testcase: igt/gem_eio/reset-stress
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180808105101.913-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 8003cef767ba..d40f55a8dc34 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -387,8 +387,18 @@ static void intel_ring_setup_status_page(struct intel_engine_cs *engine) | |||
387 | mmio = RING_HWS_PGA(engine->mmio_base); | 387 | mmio = RING_HWS_PGA(engine->mmio_base); |
388 | } | 388 | } |
389 | 389 | ||
390 | if (INTEL_GEN(dev_priv) >= 6) | 390 | if (INTEL_GEN(dev_priv) >= 6) { |
391 | I915_WRITE(RING_HWSTAM(engine->mmio_base), 0xffffffff); | 391 | u32 mask = ~0u; |
392 | |||
393 | /* | ||
394 | * Keep the render interrupt unmasked as this papers over | ||
395 | * lost interrupts following a reset. | ||
396 | */ | ||
397 | if (engine->id == RCS) | ||
398 | mask &= ~BIT(0); | ||
399 | |||
400 | I915_WRITE(RING_HWSTAM(engine->mmio_base), mask); | ||
401 | } | ||
392 | 402 | ||
393 | I915_WRITE(mmio, engine->status_page.ggtt_offset); | 403 | I915_WRITE(mmio, engine->status_page.ggtt_offset); |
394 | POSTING_READ(mmio); | 404 | POSTING_READ(mmio); |