[PATCH] intel: fix crash triggered by dpms low power mode with hardware overlay running

Zhenyu Wang zhenyu.z.wang at intel.com
Mon Mar 24 01:45:14 PDT 2008


On 2008.03.22 16:06:38 +0200, Maxim Levitsky wrote:
> >From 8a5836d887e27a9385d321a8e9f1f3243e881b78 Mon Sep 17 00:00:00 2001
> From: Maxim Levitsky <maximlevitsky at gmail.com>
> Date: Wed, 12 Mar 2008 22:18:59 +0200
> Subject: [PATCH] intel: fix crash triggered by dpms low power mode with hardware overlay running
> 
> ---
>  src/i830_video.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/i830_video.c b/src/i830_video.c
> index 1867da4..c430031 100644
> --- a/src/i830_video.c
> +++ b/src/i830_video.c
> @@ -352,7 +352,8 @@ i830_overlay_switch_to_crtc (ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
>      I830CrtcPrivatePtr  intel_crtc = crtc->driver_private;
>      int			pipeconf_reg = intel_crtc->pipe == 0 ? PIPEACONF : PIPEBCONF;
>  
> -    if (!IS_I965G(pI830) && (INREG(pipeconf_reg) & PIPEACONF_DOUBLE_WIDE))
> +    if ((!IS_I965G(pI830) && (INREG(pipeconf_reg) & PIPEACONF_DOUBLE_WIDE))
> +        || intel_crtc->dpms_mode != DPMSModeOn)
>  	pPriv->overlayOK = FALSE;
>      else
>  	pPriv->overlayOK = TRUE;
> @@ -1775,10 +1776,11 @@ i830_display_video(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
>      
>      if (crtc != pPriv->current_crtc)
>      {
> -        pPriv->current_crtc = crtc;
>  	i830_overlay_switch_to_crtc (pScrn, crtc);
> -	if (pPriv->overlayOK)
> +	if (pPriv->overlayOK) {
> +		pPriv->current_crtc = crtc;
>  	    I830ResetVideo (pScrn);
> +	    }
>      }
>  
>      if (!pPriv->overlayOK)
> -- 

Thanks, I've pushed this, although I thought it might be better to
track per-CRTC dpms status for overlay, and check current covered crtc
against it, but it abuses overlayOK fieldly and code seems more
complicate. So I think your patch is ok. 




More information about the xorg mailing list