[Intel-gfx] [PATCH] drm/i915: Prevent a machine hang by checking crtc->active before loading lut
Jesse Barnes
jbarnes at virtuousgeek.org
Fri Feb 24 18:27:44 CET 2012
On Fri, 24 Feb 2012 17:12:45 +0000
Chris Wilson <chris at chris-wilson.co.uk> wrote:
> From: Alban Browaeys <prahal at yahoo.com>
>
> 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 at yahoo.com>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: stable at kernel.org
> ---
> drivers/gpu/drm/i915/intel_display.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index cdcf99b..4b48de5 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6268,7 +6268,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 */
Yeah seems reasonable, thanks Chris.
Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120224/0a18edc3/attachment.sig>
More information about the Intel-gfx
mailing list