summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-22 17:39:30 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-27 11:16:47 -0500
commit6ba844b090b62ef4f67432d118c17ec0aa75d82d (patch)
tree2368589de0806105dc80aad45eea02acf680c04b /drivers
parentd34ff9c66d0c2b58bc5ff6c242407f32f39fcfbc (diff)
drm/i915: GEN7_MSG_CONTROL is ivb-only
At least I couldn't find it in the Haswell Bspec any more and we've tried to test-boot a Haswell machine with num_pipes forced to 0 (i.e. hit the PCH_NOP path) and the unclaimed register logic complained. So restrict this dance to just ivb platforms. v2: Art pointed out that the bits simply moved on hsw+ v3: Buy code terseneness with a notch of sublety as suggested by Chris. v4: Frob the right bit, spotted by Art. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Arthur Ranyan <arthur.j.runyan@intel.com> Cc: Dave Airlie <airlied@gmail.com> Reviewed-by: Art Runyan <arthur.j.runyan@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c12
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h2
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 072211bf99e3..39770f7b333f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4471,9 +4471,15 @@ i915_gem_init_hw(struct drm_device *dev)
4471 LOWER_SLICE_ENABLED : LOWER_SLICE_DISABLED); 4471 LOWER_SLICE_ENABLED : LOWER_SLICE_DISABLED);
4472 4472
4473 if (HAS_PCH_NOP(dev)) { 4473 if (HAS_PCH_NOP(dev)) {
4474 u32 temp = I915_READ(GEN7_MSG_CTL); 4474 if (IS_IVYBRIDGE(dev)) {
4475 temp &= ~(WAIT_FOR_PCH_FLR_ACK | WAIT_FOR_PCH_RESET_ACK); 4475 u32 temp = I915_READ(GEN7_MSG_CTL);
4476 I915_WRITE(GEN7_MSG_CTL, temp); 4476 temp &= ~(WAIT_FOR_PCH_FLR_ACK | WAIT_FOR_PCH_RESET_ACK);
4477 I915_WRITE(GEN7_MSG_CTL, temp);
4478 } else if (INTEL_INFO(dev)->gen >= 7) {
4479 u32 temp = I915_READ(HSW_NDE_RSTWRN_OPT);
4480 temp &= ~RESET_PCH_HANDSHAKE_ENABLE;
4481 I915_WRITE(HSW_NDE_RSTWRN_OPT, temp);
4482 }
4477 } 4483 }
4478 4484
4479 i915_gem_init_swizzling(dev); 4485 i915_gem_init_swizzling(dev);
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 8a82c018d874..b958e854acb0 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4119,6 +4119,8 @@
4119#define GEN7_MSG_CTL 0x45010 4119#define GEN7_MSG_CTL 0x45010
4120#define WAIT_FOR_PCH_RESET_ACK (1<<1) 4120#define WAIT_FOR_PCH_RESET_ACK (1<<1)
4121#define WAIT_FOR_PCH_FLR_ACK (1<<0) 4121#define WAIT_FOR_PCH_FLR_ACK (1<<0)
4122#define HSW_NDE_RSTWRN_OPT 0x46408
4123#define RESET_PCH_HANDSHAKE_ENABLE (1<<4)
4122 4124
4123/* GEN7 chicken */ 4125/* GEN7 chicken */
4124#define GEN7_COMMON_SLICE_CHICKEN1 0x7010 4126#define GEN7_COMMON_SLICE_CHICKEN1 0x7010