aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-06-30 16:49:37 -0400
committerEric Anholt <eric@anholt.net>2010-07-01 18:30:12 -0400
commitadcdbc6651a7086b99827cf50623a02d941261f1 (patch)
tree91cb2cfed63506b7e37761b3b96d83f20f5a6041 /drivers
parent43ed340ad93dcefe00a8f116b7e1b9dab2958543 (diff)
drm/i915: don't access FW_BLC_SELF on 965G
The register offset for FW_BLC_SELF is a totally different set of bits on Broadwater (it's actually MI_RDRET_STATE), so don't treat it like FW_BLC_SELF on 965G chips. Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=26874. Cc: stable@kernel.org Tested-by: Norman Yarvin <yarvin@yarchive.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 52510ad8b25d..aee83fa178f6 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -620,7 +620,7 @@ static int i915_sr_status(struct seq_file *m, void *unused)
620 drm_i915_private_t *dev_priv = dev->dev_private; 620 drm_i915_private_t *dev_priv = dev->dev_private;
621 bool sr_enabled = false; 621 bool sr_enabled = false;
622 622
623 if (IS_I965G(dev) || IS_I945G(dev) || IS_I945GM(dev)) 623 if (IS_I965GM(dev) || IS_I945G(dev) || IS_I945GM(dev))
624 sr_enabled = I915_READ(FW_BLC_SELF) & FW_BLC_SELF_EN; 624 sr_enabled = I915_READ(FW_BLC_SELF) & FW_BLC_SELF_EN;
625 else if (IS_I915GM(dev)) 625 else if (IS_I915GM(dev))
626 sr_enabled = I915_READ(INSTPM) & INSTPM_SELF_EN; 626 sr_enabled = I915_READ(INSTPM) & INSTPM_SELF_EN;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6db778a75e42..3acb766bda7e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2970,11 +2970,13 @@ static void i965_update_wm(struct drm_device *dev, int planea_clock,
2970 if (srwm < 0) 2970 if (srwm < 0)
2971 srwm = 1; 2971 srwm = 1;
2972 srwm &= 0x3f; 2972 srwm &= 0x3f;
2973 I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN); 2973 if (IS_I965GM(dev))
2974 I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN);
2974 } else { 2975 } else {
2975 /* Turn off self refresh if both pipes are enabled */ 2976 /* Turn off self refresh if both pipes are enabled */
2976 I915_WRITE(FW_BLC_SELF, I915_READ(FW_BLC_SELF) 2977 if (IS_I965GM(dev))
2977 & ~FW_BLC_SELF_EN); 2978 I915_WRITE(FW_BLC_SELF, I915_READ(FW_BLC_SELF)
2979 & ~FW_BLC_SELF_EN);
2978 } 2980 }
2979 2981
2980 DRM_DEBUG_KMS("Setting FIFO watermarks - A: 8, B: 8, C: 8, SR %d\n", 2982 DRM_DEBUG_KMS("Setting FIFO watermarks - A: 8, B: 8, C: 8, SR %d\n",