Skip to content

Commit

Permalink
drm/i915: Prevent a machine hang by checking crtc->active before load…
Browse files Browse the repository at this point in the history
…ing 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 <prahal@yahoo.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Alban Browaeys authored and Jesse Barnes committed Feb 24, 2012
1 parent c0e2ee1 commit aed3f09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit aed3f09

Please sign in to comment.