From: Chris Wilson Date: Thu, 21 Jun 2012 10:19:59 +0000 (+0300) Subject: drm/i915: Cantiga+ cannot handle a hsync front porch of 0 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=44f46b4222a9ba5b21dcdf13f93dc53f48768d2b;p=openwrt%2Fstaging%2Fblogic.git drm/i915: Cantiga+ cannot handle a hsync front porch of 0 This addresses WaPruneModeWithIncorrectHsyncOffset. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=50236 Signed-off-by: Chris Wilson Signed-off-by: Jani Nikula Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 42c57581c53f..778cbb88bddc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3602,6 +3602,13 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc, if (!(adjusted_mode->private_flags & INTEL_MODE_CRTC_TIMINGS_SET)) drm_mode_set_crtcinfo(adjusted_mode, 0); + /* WaPruneModeWithIncorrectHsyncOffset: Cantiga+ cannot handle modes + * with a hsync front porch of 0. + */ + if ((INTEL_INFO(dev)->gen > 4 || IS_G4X(dev)) && + adjusted_mode->hsync_start == adjusted_mode->hdisplay) + return false; + return true; }