xserver: Branch 'server-1.6-branch'

Eric Anholt anholt at kemper.freedesktop.org
Fri Jan 30 16:56:25 PST 2009


 hw/xfree86/modes/xf86Rotate.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ef796a95dd7ddf4ad5761a6ee2de1cdb56190ba2
Author: Xiang, Haihao <haihao.xiang at intel.com>
Date:   Tue Jan 6 10:03:19 2009 +0800

    avoid a potential endless loop.
    
    Previously it is possible that creating rotation data, then cleaning
    up and creating again so that pScreen->BlockHandler and
    xf86_config->BlockHandler all point to xf86RotateBlockHandler.
    See bug #19343.
    (cherry picked from commit 5f3188228eb988bd8f08b62c84f98a8ff66ee283)

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 65a553e..f9f43c9 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -291,6 +291,8 @@ xf86RotateBlockHandler(int screenNum, pointer blockData,
 	/* Re-wrap if rotation is still happening */
 	xf86_config->BlockHandler = pScreen->BlockHandler;
 	pScreen->BlockHandler = xf86RotateBlockHandler;
+    } else {
+	xf86_config->BlockHandler = NULL;
     }
 }
 
@@ -477,8 +479,10 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
 		goto bail2;
 	    
 	    /* Wrap block handler */
-	    xf86_config->BlockHandler = pScreen->BlockHandler;
-	    pScreen->BlockHandler = xf86RotateBlockHandler;
+	    if (!xf86_config->BlockHandler) {
+		xf86_config->BlockHandler = pScreen->BlockHandler;
+		pScreen->BlockHandler = xf86RotateBlockHandler;
+	    }
 	}
 #ifdef RANDR_12_INTERFACE
 	if (transform)


More information about the xorg-commit mailing list