From: Chris Wilson Date: Fri, 7 Feb 2014 20:37:03 +0000 (-0200) Subject: drm/i915: Short-circuit no-op vga_set_state() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c0cc8a556680afbfc6dc5033bdf9c8d2b85088e2;p=openwrt%2Fstaging%2Fblogic.git drm/i915: Short-circuit no-op vga_set_state() Touching the VGA registers risks a hard machine hang, at least on this ivb machine after removing a conflicting efifb. This is more than likely related to the discovery that VGA IO decode on the more recent PCH platforms is terminally broken. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cc426e10d746..1b2faa44764b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11513,6 +11513,9 @@ int intel_modeset_vga_set_state(struct drm_device *dev, bool state) return -EIO; } + if (!!(gmch_ctrl & INTEL_GMCH_VGA_DISABLE) == !state) + return 0; + if (state) gmch_ctrl &= ~INTEL_GMCH_VGA_DISABLE; else