drm/i915: enable LVDS on Cougarpoint
authorZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 7 Apr 2010 08:15:56 +0000 (16:15 +0800)
committerEric Anholt <eric@anholt.net>
Mon, 12 Apr 2010 16:23:42 +0000 (09:23 -0700)
Fix the transcoder select bit for LVDS on CPT.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_display.c

index 716ab9ea19b0168fe7c4e4f44f77c44cf21680fb..606924ef65a65319b411165bd189cc0656bacb71 100644 (file)
@@ -3492,10 +3492,17 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
 
                lvds = I915_READ(lvds_reg);
                lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
-               if (pipe == 1)
-                       lvds |= LVDS_PIPEB_SELECT;
-               else
-                       lvds &= ~LVDS_PIPEB_SELECT;
+               if (pipe == 1) {
+                       if (HAS_PCH_CPT(dev))
+                               lvds |= PORT_TRANS_B_SEL_CPT;
+                       else
+                               lvds |= LVDS_PIPEB_SELECT;
+               } else {
+                       if (HAS_PCH_CPT(dev))
+                               lvds &= ~PORT_TRANS_SEL_MASK;
+                       else
+                               lvds &= ~LVDS_PIPEB_SELECT;
+               }
                /* set the corresponsding LVDS_BORDER bit */
                lvds |= dev_priv->lvds_border_bits;
                /* Set the B0-B3 data pairs corresponding to whether we're going to