aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2012-01-12 17:51:17 -0500
committerKeith Packard <keithp@keithp.com>2012-01-13 00:36:38 -0500
commit7885d2052bd94395e337709cfba093a41f273ff1 (patch)
tree1bbfc9465d5573198cca8214f14415d5a8371c33
parenta190d703f0cd1de301b80c3219cf891c2779d15f (diff)
drm/i915: mask transcoder select bits before setting them on LVDS
The transcoder port may changed from mode set to mode set, so make sure to mask out the selection bits before setting the right ones or we'll get black screens when going from transcoder B to A. Tested-by: Vincent Vanackere <vincent.vanackere@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2a3f707caab..96cea08b10c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5808,12 +5808,15 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
5808 if (is_lvds) { 5808 if (is_lvds) {
5809 temp = I915_READ(PCH_LVDS); 5809 temp = I915_READ(PCH_LVDS);
5810 temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP; 5810 temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
5811 if (HAS_PCH_CPT(dev)) 5811 if (HAS_PCH_CPT(dev)) {
5812 temp &= ~PORT_TRANS_SEL_MASK;
5812 temp |= PORT_TRANS_SEL_CPT(pipe); 5813 temp |= PORT_TRANS_SEL_CPT(pipe);
5813 else if (pipe == 1) 5814 } else {
5814 temp |= LVDS_PIPEB_SELECT; 5815 if (pipe == 1)
5815 else 5816 temp |= LVDS_PIPEB_SELECT;
5816 temp &= ~LVDS_PIPEB_SELECT; 5817 else
5818 temp &= ~LVDS_PIPEB_SELECT;
5819 }
5817 5820
5818 /* set the corresponsding LVDS_BORDER bit */ 5821 /* set the corresponsding LVDS_BORDER bit */
5819 temp |= dev_priv->lvds_border_bits; 5822 temp |= dev_priv->lvds_border_bits;