drm/i915/pch: Set transcoder sync polarity for DP based on actual mode
authorAdam Jackson <ajax@redhat.com>
Fri, 16 Jul 2010 18:46:30 +0000 (14:46 -0400)
committerEric Anholt <eric@anholt.net>
Mon, 2 Aug 2010 02:38:04 +0000 (19:38 -0700)
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_display.c

index 82d1b91..9a95a27 100644 (file)
@@ -1998,9 +1998,12 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
                                reg = I915_READ(trans_dp_ctl);
                                reg &= ~TRANS_DP_PORT_SEL_MASK;
                                reg = TRANS_DP_OUTPUT_ENABLE |
-                                     TRANS_DP_ENH_FRAMING |
-                                     TRANS_DP_VSYNC_ACTIVE_HIGH |
-                                     TRANS_DP_HSYNC_ACTIVE_HIGH;
+                                     TRANS_DP_ENH_FRAMING;
+
+                               if (crtc->mode.flags & DRM_MODE_FLAG_PHSYNC)
+                                     reg |= TRANS_DP_HSYNC_ACTIVE_HIGH;
+                               if (crtc->mode.flags & DRM_MODE_FLAG_PVSYNC)
+                                     reg |= TRANS_DP_VSYNC_ACTIVE_HIGH;
 
                                switch (intel_trans_dp_port_sel(crtc)) {
                                case PCH_DP_B: