diff options
author | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-09-19 14:13:41 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-09-19 14:37:04 -0400 |
commit | 35a85ac60618521d41cfdb14f3fbfc8ad7329e9e (patch) | |
tree | b9e3edb84f5c5a65cfc59179bdaf903b013f2a73 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 1c966dd26b2e46a9d089fcb7e36f649000670e64 (diff) |
drm/i915: Add second slice l3 remapping
Certain HSW SKUs have a second bank of L3. This L3 remapping has a
separate register set, and interrupt from the first "slice". A slice is
simply a term to define some subset of the GPU's l3 cache. This patch
implements both the interrupt handler, and ability to communicate with
userspace about this second slice.
v2: Remove redundant check about non-existent slice.
Change warning about interrupts of unknown slices to WARN_ON_ONCE
Handle the case where we get 2 slice interrupts concurrently, and switch
the tracking of interrupts to be non-destructive (all Ville)
Don't enable/mask the second slice parity interrupt for ivb/vlv (even
though all docs I can find claim it's rsvd) (Ville + Bryan)
Keep BYT excluded from L3 parity
v3: Fix the slice = ffs to be decremented by one (found by Ville). When
I initially did my testing on the series, I was using 1-based slice
counting, so this code was correct. Not sure why my simpler tests that
I've been running since then didn't pick it up sooner.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 686e5b23481d..958b7d8fea8b 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -570,7 +570,7 @@ static int init_render_ring(struct intel_ring_buffer *ring) | |||
570 | I915_WRITE(INSTPM, _MASKED_BIT_ENABLE(INSTPM_FORCE_ORDERING)); | 570 | I915_WRITE(INSTPM, _MASKED_BIT_ENABLE(INSTPM_FORCE_ORDERING)); |
571 | 571 | ||
572 | if (HAS_L3_GPU_CACHE(dev)) | 572 | if (HAS_L3_GPU_CACHE(dev)) |
573 | I915_WRITE_IMR(ring, ~GT_RENDER_L3_PARITY_ERROR_INTERRUPT); | 573 | I915_WRITE_IMR(ring, ~GT_PARITY_ERROR(dev)); |
574 | 574 | ||
575 | return ret; | 575 | return ret; |
576 | } | 576 | } |
@@ -1000,7 +1000,7 @@ gen6_ring_get_irq(struct intel_ring_buffer *ring) | |||
1000 | if (HAS_L3_GPU_CACHE(dev) && ring->id == RCS) | 1000 | if (HAS_L3_GPU_CACHE(dev) && ring->id == RCS) |
1001 | I915_WRITE_IMR(ring, | 1001 | I915_WRITE_IMR(ring, |
1002 | ~(ring->irq_enable_mask | | 1002 | ~(ring->irq_enable_mask | |
1003 | GT_RENDER_L3_PARITY_ERROR_INTERRUPT)); | 1003 | GT_PARITY_ERROR(dev))); |
1004 | else | 1004 | else |
1005 | I915_WRITE_IMR(ring, ~ring->irq_enable_mask); | 1005 | I915_WRITE_IMR(ring, ~ring->irq_enable_mask); |
1006 | ilk_enable_gt_irq(dev_priv, ring->irq_enable_mask); | 1006 | ilk_enable_gt_irq(dev_priv, ring->irq_enable_mask); |
@@ -1020,8 +1020,7 @@ gen6_ring_put_irq(struct intel_ring_buffer *ring) | |||
1020 | spin_lock_irqsave(&dev_priv->irq_lock, flags); | 1020 | spin_lock_irqsave(&dev_priv->irq_lock, flags); |
1021 | if (--ring->irq_refcount == 0) { | 1021 | if (--ring->irq_refcount == 0) { |
1022 | if (HAS_L3_GPU_CACHE(dev) && ring->id == RCS) | 1022 | if (HAS_L3_GPU_CACHE(dev) && ring->id == RCS) |
1023 | I915_WRITE_IMR(ring, | 1023 | I915_WRITE_IMR(ring, ~GT_PARITY_ERROR(dev)); |
1024 | ~GT_RENDER_L3_PARITY_ERROR_INTERRUPT); | ||
1025 | else | 1024 | else |
1026 | I915_WRITE_IMR(ring, ~0); | 1025 | I915_WRITE_IMR(ring, ~0); |
1027 | ilk_disable_gt_irq(dev_priv, ring->irq_enable_mask); | 1026 | ilk_disable_gt_irq(dev_priv, ring->irq_enable_mask); |