aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c58
1 files changed, 27 insertions, 31 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a9013fda1c3a..2e83dbe5ecc0 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4235,7 +4235,7 @@ static void vlv_update_pll(struct intel_crtc *crtc)
4235 u32 dpll, mdiv; 4235 u32 dpll, mdiv;
4236 u32 bestn, bestm1, bestm2, bestp1, bestp2; 4236 u32 bestn, bestm1, bestm2, bestp1, bestp2;
4237 bool is_hdmi; 4237 bool is_hdmi;
4238 u32 coreclk, reg_val, temp; 4238 u32 coreclk, reg_val, dpll_md;
4239 4239
4240 mutex_lock(&dev_priv->dpio_lock); 4240 mutex_lock(&dev_priv->dpio_lock);
4241 4241
@@ -4333,16 +4333,13 @@ static void vlv_update_pll(struct intel_crtc *crtc)
4333 if (wait_for(((I915_READ(DPLL(pipe)) & DPLL_LOCK_VLV) == DPLL_LOCK_VLV), 1)) 4333 if (wait_for(((I915_READ(DPLL(pipe)) & DPLL_LOCK_VLV) == DPLL_LOCK_VLV), 1))
4334 DRM_ERROR("DPLL %d failed to lock\n", pipe); 4334 DRM_ERROR("DPLL %d failed to lock\n", pipe);
4335 4335
4336 if (is_hdmi) { 4336 dpll_md = 0;
4337 temp = 0; 4337 if (crtc->config.pixel_multiplier > 1) {
4338 if (crtc->config.pixel_multiplier > 1) { 4338 dpll_md = (crtc->config.pixel_multiplier - 1)
4339 temp = (crtc->config.pixel_multiplier - 1) 4339 << DPLL_MD_UDI_MULTIPLIER_SHIFT;
4340 << DPLL_MD_UDI_MULTIPLIER_SHIFT;
4341 }
4342
4343 I915_WRITE(DPLL_MD(pipe), temp);
4344 POSTING_READ(DPLL_MD(pipe));
4345 } 4340 }
4341 I915_WRITE(DPLL_MD(pipe), dpll_md);
4342 POSTING_READ(DPLL_MD(pipe));
4346 4343
4347 if (crtc->config.has_dp_encoder) 4344 if (crtc->config.has_dp_encoder)
4348 intel_dp_set_m_n(crtc); 4345 intel_dp_set_m_n(crtc);
@@ -4374,14 +4371,15 @@ static void i9xx_update_pll(struct intel_crtc *crtc,
4374 else 4371 else
4375 dpll |= DPLLB_MODE_DAC_SERIAL; 4372 dpll |= DPLLB_MODE_DAC_SERIAL;
4376 4373
4377 if (is_sdvo) { 4374 if ((crtc->config.pixel_multiplier > 1) &&
4378 if ((crtc->config.pixel_multiplier > 1) && 4375 (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))) {
4379 (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))) { 4376 dpll |= (crtc->config.pixel_multiplier - 1)
4380 dpll |= (crtc->config.pixel_multiplier - 1) 4377 << SDVO_MULTIPLIER_SHIFT_HIRES;
4381 << SDVO_MULTIPLIER_SHIFT_HIRES;
4382 }
4383 dpll |= DPLL_DVO_HIGH_SPEED;
4384 } 4378 }
4379
4380 if (is_sdvo)
4381 dpll |= DPLL_DVO_HIGH_SPEED;
4382
4385 if (intel_pipe_has_type(&crtc->base, INTEL_OUTPUT_DISPLAYPORT)) 4383 if (intel_pipe_has_type(&crtc->base, INTEL_OUTPUT_DISPLAYPORT))
4386 dpll |= DPLL_DVO_HIGH_SPEED; 4384 dpll |= DPLL_DVO_HIGH_SPEED;
4387 4385
@@ -4441,15 +4439,12 @@ static void i9xx_update_pll(struct intel_crtc *crtc,
4441 udelay(150); 4439 udelay(150);
4442 4440
4443 if (INTEL_INFO(dev)->gen >= 4) { 4441 if (INTEL_INFO(dev)->gen >= 4) {
4444 u32 temp = 0; 4442 u32 dpll_md = 0;
4445 if (is_sdvo) { 4443 if (crtc->config.pixel_multiplier > 1) {
4446 temp = 0; 4444 dpll_md = (crtc->config.pixel_multiplier - 1)
4447 if (crtc->config.pixel_multiplier > 1) { 4445 << DPLL_MD_UDI_MULTIPLIER_SHIFT;
4448 temp = (crtc->config.pixel_multiplier - 1)
4449 << DPLL_MD_UDI_MULTIPLIER_SHIFT;
4450 }
4451 } 4446 }
4452 I915_WRITE(DPLL_MD(pipe), temp); 4447 I915_WRITE(DPLL_MD(pipe), dpll_md);
4453 } else { 4448 } else {
4454 /* The pixel multiplier can only be updated once the 4449 /* The pixel multiplier can only be updated once the
4455 * DPLL is enabled and the clocks are stable. 4450 * DPLL is enabled and the clocks are stable.
@@ -5562,13 +5557,14 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc,
5562 dpll |= DPLLB_MODE_LVDS; 5557 dpll |= DPLLB_MODE_LVDS;
5563 else 5558 else
5564 dpll |= DPLLB_MODE_DAC_SERIAL; 5559 dpll |= DPLLB_MODE_DAC_SERIAL;
5565 if (is_sdvo) { 5560
5566 if (intel_crtc->config.pixel_multiplier > 1) { 5561 if (intel_crtc->config.pixel_multiplier > 1) {
5567 dpll |= (intel_crtc->config.pixel_multiplier - 1) 5562 dpll |= (intel_crtc->config.pixel_multiplier - 1)
5568 << PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT; 5563 << PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT;
5569 }
5570 dpll |= DPLL_DVO_HIGH_SPEED;
5571 } 5564 }
5565
5566 if (is_sdvo)
5567 dpll |= DPLL_DVO_HIGH_SPEED;
5572 if (intel_crtc->config.has_dp_encoder) 5568 if (intel_crtc->config.has_dp_encoder)
5573 dpll |= DPLL_DVO_HIGH_SPEED; 5569 dpll |= DPLL_DVO_HIGH_SPEED;
5574 5570