Commit c99f53f7 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Simplify DP port limited color range bit platform checks

Instead of checking for everything not supporting the limited color
range bit in the DP port register, let's check for the one thing
that does have it (g4x).
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarJim Bride <jim.bride@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479145447-12907-3-git-send-email-ville.syrjala@linux.intel.com
parent 0037071d
...@@ -1791,9 +1791,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder, ...@@ -1791,9 +1791,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder,
trans_dp &= ~TRANS_DP_ENH_FRAMING; trans_dp &= ~TRANS_DP_ENH_FRAMING;
I915_WRITE(TRANS_DP_CTL(crtc->pipe), trans_dp); I915_WRITE(TRANS_DP_CTL(crtc->pipe), trans_dp);
} else { } else {
if (!HAS_PCH_SPLIT(dev_priv) && !IS_VALLEYVIEW(dev_priv) && if (IS_G4X(dev_priv) && pipe_config->limited_color_range)
!IS_CHERRYVIEW(dev_priv) &&
pipe_config->limited_color_range)
intel_dp->DP |= DP_COLOR_RANGE_16_235; intel_dp->DP |= DP_COLOR_RANGE_16_235;
if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
...@@ -2515,8 +2513,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder, ...@@ -2515,8 +2513,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
pipe_config->base.adjusted_mode.flags |= flags; pipe_config->base.adjusted_mode.flags |= flags;
if (!HAS_PCH_SPLIT(dev_priv) && !IS_VALLEYVIEW(dev_priv) && if (IS_G4X(dev_priv) && tmp & DP_COLOR_RANGE_16_235)
!IS_CHERRYVIEW(dev_priv) && tmp & DP_COLOR_RANGE_16_235)
pipe_config->limited_color_range = true; pipe_config->limited_color_range = true;
pipe_config->lane_count = pipe_config->lane_count =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment