aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-12-30 12:36:39 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-11 15:37:05 -0500
commitdbdc647927a0f4b34e7cf486889d8f671f73d2e5 (patch)
tree8d508c0c84ed651ec82e4f274708ef01e868456b /drivers
parentd78cb50baa9177353d6719612b83558a9bf2d59b (diff)
drm/i915: avoid reading non-existent PLL reg on Ironlake+
These functions need to be reworked for Ironlake and above, but until then at least avoid reading non-existent registers. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [ickle: combine with a gratuitous tidy] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 75c433e6f457..043825c9ddcf 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5036,8 +5036,8 @@ static void intel_increase_pllclock(struct drm_crtc *crtc)
5036 drm_i915_private_t *dev_priv = dev->dev_private; 5036 drm_i915_private_t *dev_priv = dev->dev_private;
5037 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 5037 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
5038 int pipe = intel_crtc->pipe; 5038 int pipe = intel_crtc->pipe;
5039 int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; 5039 int dpll_reg = DPLL(pipe);
5040 int dpll = I915_READ(dpll_reg); 5040 int dpll;
5041 5041
5042 if (HAS_PCH_SPLIT(dev)) 5042 if (HAS_PCH_SPLIT(dev))
5043 return; 5043 return;
@@ -5045,17 +5045,19 @@ static void intel_increase_pllclock(struct drm_crtc *crtc)
5045 if (!dev_priv->lvds_downclock_avail) 5045 if (!dev_priv->lvds_downclock_avail)
5046 return; 5046 return;
5047 5047
5048 dpll = I915_READ(dpll_reg);
5048 if (!HAS_PIPE_CXSR(dev) && (dpll & DISPLAY_RATE_SELECT_FPA1)) { 5049 if (!HAS_PIPE_CXSR(dev) && (dpll & DISPLAY_RATE_SELECT_FPA1)) {
5049 DRM_DEBUG_DRIVER("upclocking LVDS\n"); 5050 DRM_DEBUG_DRIVER("upclocking LVDS\n");
5050 5051
5051 /* Unlock panel regs */ 5052 /* Unlock panel regs */
5052 I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | 5053 I915_WRITE(PP_CONTROL,
5053 PANEL_UNLOCK_REGS); 5054 I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS);
5054 5055
5055 dpll &= ~DISPLAY_RATE_SELECT_FPA1; 5056 dpll &= ~DISPLAY_RATE_SELECT_FPA1;
5056 I915_WRITE(dpll_reg, dpll); 5057 I915_WRITE(dpll_reg, dpll);
5057 dpll = I915_READ(dpll_reg); 5058 POSTING_READ(dpll_reg);
5058 intel_wait_for_vblank(dev, pipe); 5059 intel_wait_for_vblank(dev, pipe);
5060
5059 dpll = I915_READ(dpll_reg); 5061 dpll = I915_READ(dpll_reg);
5060 if (dpll & DISPLAY_RATE_SELECT_FPA1) 5062 if (dpll & DISPLAY_RATE_SELECT_FPA1)
5061 DRM_DEBUG_DRIVER("failed to upclock LVDS!\n"); 5063 DRM_DEBUG_DRIVER("failed to upclock LVDS!\n");