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/i915_reg.h | |
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/i915_reg.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index af6f93ca7296..c4f9bef6d073 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -927,6 +927,7 @@ | |||
927 | #define GT_BLT_USER_INTERRUPT (1 << 22) | 927 | #define GT_BLT_USER_INTERRUPT (1 << 22) |
928 | #define GT_BSD_CS_ERROR_INTERRUPT (1 << 15) | 928 | #define GT_BSD_CS_ERROR_INTERRUPT (1 << 15) |
929 | #define GT_BSD_USER_INTERRUPT (1 << 12) | 929 | #define GT_BSD_USER_INTERRUPT (1 << 12) |
930 | #define GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1 (1 << 11) /* hsw+; rsvd on snb, ivb, vlv */ | ||
930 | #define GT_RENDER_L3_PARITY_ERROR_INTERRUPT (1 << 5) /* !snb */ | 931 | #define GT_RENDER_L3_PARITY_ERROR_INTERRUPT (1 << 5) /* !snb */ |
931 | #define GT_RENDER_PIPECTL_NOTIFY_INTERRUPT (1 << 4) | 932 | #define GT_RENDER_PIPECTL_NOTIFY_INTERRUPT (1 << 4) |
932 | #define GT_RENDER_CS_MASTER_ERROR_INTERRUPT (1 << 3) | 933 | #define GT_RENDER_CS_MASTER_ERROR_INTERRUPT (1 << 3) |
@@ -937,6 +938,10 @@ | |||
937 | #define PM_VEBOX_CS_ERROR_INTERRUPT (1 << 12) /* hsw+ */ | 938 | #define PM_VEBOX_CS_ERROR_INTERRUPT (1 << 12) /* hsw+ */ |
938 | #define PM_VEBOX_USER_INTERRUPT (1 << 10) /* hsw+ */ | 939 | #define PM_VEBOX_USER_INTERRUPT (1 << 10) /* hsw+ */ |
939 | 940 | ||
941 | #define GT_PARITY_ERROR(dev) \ | ||
942 | (GT_RENDER_L3_PARITY_ERROR_INTERRUPT | \ | ||
943 | IS_HASWELL(dev) ? GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1 : 0) | ||
944 | |||
940 | /* These are all the "old" interrupts */ | 945 | /* These are all the "old" interrupts */ |
941 | #define ILK_BSD_USER_INTERRUPT (1<<5) | 946 | #define ILK_BSD_USER_INTERRUPT (1<<5) |
942 | #define I915_PIPE_CONTROL_NOTIFY_INTERRUPT (1<<18) | 947 | #define I915_PIPE_CONTROL_NOTIFY_INTERRUPT (1<<18) |
@@ -4747,6 +4752,7 @@ | |||
4747 | 4752 | ||
4748 | /* IVYBRIDGE DPF */ | 4753 | /* IVYBRIDGE DPF */ |
4749 | #define GEN7_L3CDERRST1 0xB008 /* L3CD Error Status 1 */ | 4754 | #define GEN7_L3CDERRST1 0xB008 /* L3CD Error Status 1 */ |
4755 | #define HSW_L3CDERRST11 0xB208 /* L3CD Error Status register 1 slice 1 */ | ||
4750 | #define GEN7_L3CDERRST1_ROW_MASK (0x7ff<<14) | 4756 | #define GEN7_L3CDERRST1_ROW_MASK (0x7ff<<14) |
4751 | #define GEN7_PARITY_ERROR_VALID (1<<13) | 4757 | #define GEN7_PARITY_ERROR_VALID (1<<13) |
4752 | #define GEN7_L3CDERRST1_BANK_MASK (3<<11) | 4758 | #define GEN7_L3CDERRST1_BANK_MASK (3<<11) |
@@ -4760,6 +4766,7 @@ | |||
4760 | #define GEN7_L3CDERRST1_ENABLE (1<<7) | 4766 | #define GEN7_L3CDERRST1_ENABLE (1<<7) |
4761 | 4767 | ||
4762 | #define GEN7_L3LOG_BASE 0xB070 | 4768 | #define GEN7_L3LOG_BASE 0xB070 |
4769 | #define HSW_L3LOG_BASE_SLICE1 0xB270 | ||
4763 | #define GEN7_L3LOG_SIZE 0x80 | 4770 | #define GEN7_L3LOG_SIZE 0x80 |
4764 | 4771 | ||
4765 | #define GEN7_HALF_SLICE_CHICKEN1 0xe100 /* IVB GT1 + VLV */ | 4772 | #define GEN7_HALF_SLICE_CHICKEN1 0xe100 /* IVB GT1 + VLV */ |