Commit efc2cfff28a9424a0f9f8b068c6c8697435664c3

Authored by Ville Syrjälä
Committed by Daniel Vetter
1 parent 609aeacaac

drm/i915: Fix the interlace mode selection for gmch platforms

PIPECONF_INTERLACE_W_FIELD_INDICATION is only meant to be used for sdvo
since it implies a slightly weird vsync shift of htotal/2. For everything
else we should use PIPECONF_INTERLACE_W_SYNC_SHIFT and let the value in
the VSYNCSHIFT register take effect.

The only exception is gen3 simply because VSYNCSHIFT didn't exist yet.
Gen2 doesn't support interlaced modes at all, so we can drop the
explicit gen2 checks.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Showing 1 changed file with 7 additions and 7 deletions Side-by-side Diff

drivers/gpu/drm/i915/intel_display.c
... ... @@ -5535,13 +5535,13 @@
5535 5535 }
5536 5536 }
5537 5537  
5538   - if (IS_VALLEYVIEW(dev) &&
5539   - intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE)
5540   - pipeconf |= PIPECONF_INTERLACE_W_SYNC_SHIFT;
5541   - else if (!IS_GEN2(dev) &&
5542   - intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE)
5543   - pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION;
5544   - else
  5538 + if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) {
  5539 + if (INTEL_INFO(dev)->gen < 4 ||
  5540 + intel_pipe_has_type(&intel_crtc->base, INTEL_OUTPUT_SDVO))
  5541 + pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION;
  5542 + else
  5543 + pipeconf |= PIPECONF_INTERLACE_W_SYNC_SHIFT;
  5544 + } else
5545 5545 pipeconf |= PIPECONF_PROGRESSIVE;
5546 5546  
5547 5547 if (IS_VALLEYVIEW(dev) && intel_crtc->config.limited_color_range)