From 1bf3eaadf2d46eb4d42b71f144809d1aec422387 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Fri, 21 May 2010 21:22:09 +0800 Subject: [PATCH] drm/i915: Set DP sync polarity according to the desired mode Signed-off-by: Zhao Yakui --- drivers/gpu/drm/i915/intel_dp.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 439506c..48ce732 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -632,9 +632,12 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, dp_priv->DP = (DP_LINK_TRAIN_OFF | DP_VOLTAGE_0_4 | - DP_PRE_EMPHASIS_0 | - DP_SYNC_VS_HIGH | - DP_SYNC_HS_HIGH); + DP_PRE_EMPHASIS_0); + + if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) + dp_priv->DP |= DP_SYNC_HS_HIGH; + if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) + dp_priv->DP |= DP_SYNC_VS_HIGH; switch (dp_priv->lane_count) { case 1: -- 1.5.4.5