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-Tag: MMI-PSA29.97-13-9~12412^2~59^2~54 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0cc8a556680afbfc6dc5033bdf9c8d2b85088e2;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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