[PATCH] xf86Modes: restore block handler when destroying rotate

Hong Liu hong.liu at intel.com
Mon Mar 24 02:29:38 PDT 2008


This bug only happens in the following situation:
two crtcs, only the 2nd crtc is rotated. Thus when entering VT and
setting mode on the 1st crtc, X server will destroy rotate because no
crtcs are rotated (the shadow buffer on the 2nd crtc was freed when
Leaving VT). The pScreen->BlockHandler is xf86RotateBlockHandler when we
try to wrap block handler when setup rotation on the 2nd crtc if we
don't restore it when destroying damage.

Please help review and commit this patch.

Thanks,
Hong

On Fri, 2008-03-21 at 16:00 +0800, Hong Liu wrote:
> fix bug #15157.
> 
> Thanks,
> Hong
> 
> 
> diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
> index e2d6295..d3bb124 100644
> --- a/hw/xfree86/modes/xf86Rotate.c
> +++ b/hw/xfree86/modes/xf86Rotate.c
> @@ -475,6 +475,9 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
>  	}
>  	DamageDestroy (xf86_config->rotation_damage);
>  	xf86_config->rotation_damage = NULL;
> +
> +	/* restore block handler */
> +	pScreen->BlockHandler = xf86_config->BlockHandler;
>      }
>  }
>  
> 
> 
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg




More information about the xorg mailing list