[2/2] drm/i915: set dither bits on eDP panels too
diff mbox

Message ID 1283896086-2727-2-git-send-email-jbarnes@virtuousgeek.org
State New, archived
Headers show

Commit Message

Jesse Barnes Sept. 7, 2010, 9:48 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c23e7e3..f0a9f00 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3954,23 +3954,24 @@  static int intel_crtc_mode_set(struct drm_crtc *crtc,
 		 * appropriately here, but we need to look more thoroughly into how
 		 * panels behave in the two modes.
 		 */
-		/* set the dithering flag */
+		/* set the dithering flag on non-PCH LVDS as needed */
 		if (IS_I965G(dev)) {
-			if (dev_priv->lvds_dither) {
-				if (HAS_PCH_SPLIT(dev)) {
-					pipeconf |= PIPECONF_DITHER_EN;
-					pipeconf |= PIPECONF_DITHER_TYPE_ST1;
-				} else
-					lvds |= LVDS_ENABLE_DITHER;
-			} else {
-				if (!HAS_PCH_SPLIT(dev)) {
-					lvds &= ~LVDS_ENABLE_DITHER;
-				}
-			}
+			if (dev_priv->lvds_dither && !HAS_PCH_SPLIT(dev))
+				lvds |= LVDS_ENABLE_DITHER;
+			else if (!HAS_PCH_SPLIT(dev))
+				lvds &= ~LVDS_ENABLE_DITHER;
 		}
 		I915_WRITE(lvds_reg, lvds);
 		I915_READ(lvds_reg);
 	}
+
+	/* set the dithering flag if needed */
+	if (IS_I965G(dev) && HAS_PCH_SPLIT(dev) && dev_priv->lvds_dither &&
+	    (is_lvds || has_edp_encoder)) {
+		pipeconf |= PIPECONF_DITHER_EN;
+		pipeconf |= PIPECONF_DITHER_TYPE_ST1;
+	}
+
 	if (is_dp)
 		intel_dp_set_m_n(crtc, mode, adjusted_mode);
 	else if (HAS_PCH_SPLIT(dev)) {