aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-02 07:07:06 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-02 08:37:51 -0400
commit074b5e1a99fb5017122591d70098601e0484ca6a (patch)
treeca63d7bf7f0700f4a2bffd9da2dbf73977cbcae8 /drivers
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
drm/i915: Do not read non-existent DPLL registers on PCH hardware
We only execute intel_decrease_pllclock for pre-PCH hardware, typically gen4 mobiles. However, in the variable declaration we did read from the non-PCH DPLL register, quite naughty and detected by SandyBridge. Reported-and-tested-by: Andrey Rahmatullin <wrar@wrar.name> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49025 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5908cd563400..1b1cf3b3ff51 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7072,9 +7072,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
7072 struct drm_device *dev = crtc->dev; 7072 struct drm_device *dev = crtc->dev;
7073 drm_i915_private_t *dev_priv = dev->dev_private; 7073 drm_i915_private_t *dev_priv = dev->dev_private;
7074 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 7074 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
7075 int pipe = intel_crtc->pipe;
7076 int dpll_reg = DPLL(pipe);
7077 int dpll = I915_READ(dpll_reg);
7078 7075
7079 if (HAS_PCH_SPLIT(dev)) 7076 if (HAS_PCH_SPLIT(dev))
7080 return; 7077 return;
@@ -7087,10 +7084,15 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
7087 * the manual case. 7084 * the manual case.
7088 */ 7085 */
7089 if (!HAS_PIPE_CXSR(dev) && intel_crtc->lowfreq_avail) { 7086 if (!HAS_PIPE_CXSR(dev) && intel_crtc->lowfreq_avail) {
7087 int pipe = intel_crtc->pipe;
7088 int dpll_reg = DPLL(pipe);
7089 u32 dpll;
7090
7090 DRM_DEBUG_DRIVER("downclocking LVDS\n"); 7091 DRM_DEBUG_DRIVER("downclocking LVDS\n");
7091 7092
7092 assert_panel_unlocked(dev_priv, pipe); 7093 assert_panel_unlocked(dev_priv, pipe);
7093 7094
7095 dpll = I915_READ(dpll_reg);
7094 dpll |= DISPLAY_RATE_SELECT_FPA1; 7096 dpll |= DISPLAY_RATE_SELECT_FPA1;
7095 I915_WRITE(dpll_reg, dpll); 7097 I915_WRITE(dpll_reg, dpll);
7096 intel_wait_for_vblank(dev, pipe); 7098 intel_wait_for_vblank(dev, pipe);
@@ -7098,7 +7100,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
7098 if (!(dpll & DISPLAY_RATE_SELECT_FPA1)) 7100 if (!(dpll & DISPLAY_RATE_SELECT_FPA1))
7099 DRM_DEBUG_DRIVER("failed to downclock LVDS!\n"); 7101 DRM_DEBUG_DRIVER("failed to downclock LVDS!\n");
7100 } 7102 }
7101
7102} 7103}
7103 7104
7104/** 7105/**