From c30b16c88746b0c4e287e137d3b2bfe51c1e43a4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 21 Feb 2014 09:17:42 +0000 Subject: [PATCH] drm/i915: Select between sdvo/dp interlace modes on vlv and g4x On Valleyview (and g4x) we support both sdvo/hdmi and dp interfaces. According to a hint in the spec, the current interlace pipeconf setting is for sdvo, and we should be using an alternate for dp. Make it so. References: https://bugs.freedesktop.org/show_bug.cgi?id=74964 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d5eafd1..eee79bb 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5332,9 +5332,21 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) } if (!IS_GEN2(dev) && - intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) - pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; - else + intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) { + bool is_sdvo = false; + for_each_encoder_on_crtc(dev, crtc, intel_encoder) { + switch (intel_encoder->type) { + case INTEL_OUTPUT_SDVO: + case INTEL_OUTPUT_HDMI: + is_sdvo = true; + break; + } + } + if (is_sdvo) + pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; + else + pipeconf |= PIPECONF_INTERLACE_W_SYNC_SHIFT_PANEL; + } else pipeconf |= PIPECONF_PROGRESSIVE; if (IS_VALLEYVIEW(dev) && intel_crtc->config.limited_color_range) -- 1.7.9.5