From: Alban Browaeys Date: Fri, 24 Feb 2012 17:12:45 +0000 (+0000) Subject: drm/i915: Prevent a machine hang by checking crtc->active before loading lut X-Git-Tag: MMI-PSA29.97-13-9~17378^2~4^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aed3f09db39596e539f90b11a5016aea4d8442e1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: Prevent a machine hang by checking crtc->active before loading lut Before loading the lut (gamma), check the active state of intel_crtc, otherwise at least on gen2 hang ensue. This is reproducible in Xorg via: xset dpms force off then xgamma -rgamma 2.0 # freeze. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44505 Signed-off-by: Alban Browaeys Signed-off-by: Chris Wilson Reviewed-by: Jesse Barnes Cc: stable@kernel.org Signed-off-by: Jesse Barnes --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 4871ba0dcc14..f851db7be2cc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6184,7 +6184,7 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) int i; /* The clocks have to be on to load the palette. */ - if (!crtc->enabled) + if (!crtc->enabled || !intel_crtc->active) return; /* use legacy palette for Ironlake */