Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs...
[pandora-kernel.git] / drivers / gpu / drm / i915 / intel_crt.c
index 451534c..fee0ad0 100644 (file)
@@ -152,17 +152,13 @@ static void intel_crt_mode_set(struct drm_encoder *encoder,
        if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
                adpa |= ADPA_VSYNC_ACTIVE_HIGH;
 
-       if (intel_crtc->pipe == 0) {
-               if (HAS_PCH_CPT(dev))
-                       adpa |= PORT_TRANS_A_SEL_CPT;
-               else
-                       adpa |= ADPA_PIPE_A_SELECT;
-       } else {
-               if (HAS_PCH_CPT(dev))
-                       adpa |= PORT_TRANS_B_SEL_CPT;
-               else
-                       adpa |= ADPA_PIPE_B_SELECT;
-       }
+       /* For CPT allow 3 pipe config, for others just use A or B */
+       if (HAS_PCH_CPT(dev))
+               adpa |= PORT_TRANS_SEL_CPT(intel_crtc->pipe);
+       else if (intel_crtc->pipe == 0)
+               adpa |= ADPA_PIPE_A_SELECT;
+       else
+               adpa |= ADPA_PIPE_B_SELECT;
 
        if (!HAS_PCH_SPLIT(dev))
                I915_WRITE(BCLRPAT(intel_crtc->pipe), 0);