debian/changelog               |    7 +++++++
 hw/xfree86/modes/xf86Crtc.c    |    2 ++
 hw/xfree86/modes/xf86RandR12.c |   26 +++++++++++++++++++++++++-
 hw/xfree86/modes/xf86RandR12.h |    1 +
 4 files changed, 35 insertions(+), 1 deletion(-)

New commits:
commit 9f0f3e7f7fbc7efef430cdd9aacae4444e13b01e
Author: Julien Cristau <jcris...@debian.org>
Date:   Sat Sep 4 11:49:32 2010 +0200

    Add changelog entry

diff --git a/debian/changelog b/debian/changelog
index 3500ddd..f18767e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.7.7-5) UNRELEASED; urgency=low
+
+  * Clean up RandR12 bits on screen close.  Avoids infinite recursion on
+    EnterVT in the second server generation (closes: #595386).
+
+ -- Julien Cristau <jcris...@debian.org>  Sat, 04 Sep 2010 11:48:10 +0200
+
 xorg-server (2:1.7.7-4) unstable; urgency=low
 
   * Set default xkb rules to evdev on linux, to work around a wrong default in

commit 3fabfc198b6f22338f7691907db1b7c849ccac4c
Author: Keith Packard <kei...@keithp.com>
Date:   Fri May 7 22:56:04 2010 -0700

    Clean up RandR12 bits on screen close (bug 27114)
    
    When resetting the server, pScrn->EnterVT must be unwrapped or the
    next server generation will end up wrapping the wrapper and causing an
    infinite recursion on EnterVT.
    
    Signed-off-by: Keith Packard <kei...@keithp.com>
    Tested-by: Michael Stapelberg <michael+freedesk...@stapelberg.de>
    (cherry picked from commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 334fad4..3fcd79b 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -756,6 +756,8 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen)
 
        crtc->randr_crtc = NULL;
     }
+    xf86RandR12CloseScreen (screen);
+
     return screen->CloseScreen (index, screen);
 }
 
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 7ba09b6..9325e9b 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -927,6 +927,24 @@ xf86RandR12Init (ScreenPtr pScreen)
 }
 
 void
+xf86RandR12CloseScreen (ScreenPtr pScreen)
+{
+    XF86RandRInfoPtr   randrp;
+
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
+    if (xf86RandR12Key == NULL)
+       return;
+#endif
+
+    randrp = XF86RANDRINFO(pScreen);
+#if RANDR_12_INTERFACE
+    xf86Screens[pScreen->myNum]->EnterVT = randrp->orig_EnterVT;
+#endif
+
+    free(randrp);
+}
+
+void
 xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations)
 {
     XF86RandRInfoPtr   randrp;
@@ -1754,10 +1772,16 @@ static Bool
 xf86RandR12EnterVT (int screen_index, int flags)
 {
     ScreenPtr        pScreen = screenInfo.screens[screen_index];
+    ScrnInfoPtr             pScrn = xf86Screens[screen_index];
     XF86RandRInfoPtr randrp  = XF86RANDRINFO(pScreen);
+    Bool            ret;
 
     if (randrp->orig_EnterVT) {
-       if (!randrp->orig_EnterVT (screen_index, flags))
+       pScrn->EnterVT = randrp->orig_EnterVT;
+       ret = pScrn->EnterVT (screen_index, flags);
+       randrp->orig_EnterVT = pScrn->EnterVT;
+       pScrn->EnterVT = xf86RandR12EnterVT;
+       if (!ret)
            return FALSE;
     }
 
diff --git a/hw/xfree86/modes/xf86RandR12.h b/hw/xfree86/modes/xf86RandR12.h
index c8d9918..0c586be 100644
--- a/hw/xfree86/modes/xf86RandR12.h
+++ b/hw/xfree86/modes/xf86RandR12.h
@@ -30,6 +30,7 @@
 
 extern _X_EXPORT Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen);
 extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen);
+extern _X_EXPORT void xf86RandR12CloseScreen(ScreenPtr pScreen);
 extern _X_EXPORT void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation 
rotation);
 extern _X_EXPORT void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool 
transforms);
 extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation 
rotation, int rate,


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1orpnr-0005zm...@alioth.debian.org

Reply via email to