[PATCH] dri2: Don't block GLX clients on VT switch

Adam Jackson ajax at redhat.com
Wed Jun 29 12:53:14 PDT 2011


This was necessary in DRI1 for a variety of reasons (SAREA ownership,
VRAM layout, etc).  None of that is relevant to DRI2.  Tested with Gnome
3 on an Ironlake GPU.

As a pleasant side effect, we no longer need the ScrnInfoRec type, which
means DRI2 is (at least very nearly) DDX-independent.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/glxdri2.c |   51 ---------------------------------------------------
 1 files changed, 0 insertions(+), 51 deletions(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index d979717..ba6aad5 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -64,9 +64,6 @@ struct __GLXDRIscreen {
     void		*driver;
     int			 fd;
 
-    xf86EnterVTProc	*enterVT;
-    xf86LeaveVTProc	*leaveVT;
-
     const __DRIcoreExtension *core;
     const __DRIdri2Extension *dri2;
     const __DRI2flushExtension *flush;
@@ -586,48 +583,6 @@ static const __DRIextension *loader_extensions[] = {
     NULL
 };
 
-static Bool
-glxDRIEnterVT (int index, int flags)
-{
-    ScrnInfoPtr scrn = xf86Screens[index];
-    Bool	ret;
-    __GLXDRIscreen *screen = (__GLXDRIscreen *) 
-	glxGetScreen(screenInfo.screens[index]);
-
-    LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
-
-    scrn->EnterVT = screen->enterVT;
-
-    ret = scrn->EnterVT (index, flags);
-
-    screen->enterVT = scrn->EnterVT;
-    scrn->EnterVT = glxDRIEnterVT;
-
-    if (!ret)
-	return FALSE;
-    
-    glxResumeClients();
-
-    return TRUE;
-}
-
-static void
-glxDRILeaveVT (int index, int flags)
-{
-    ScrnInfoPtr scrn = xf86Screens[index];
-    __GLXDRIscreen *screen = (__GLXDRIscreen *)
-	glxGetScreen(screenInfo.screens[index]);
-
-    LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
-
-    glxSuspendClients();
-
-    scrn->LeaveVT = screen->leaveVT;
-    (*screen->leaveVT) (index, flags);
-    screen->leaveVT = scrn->LeaveVT;
-    scrn->LeaveVT = glxDRILeaveVT;
-}
-
 static void
 initializeExtensions(__GLXDRIscreen *screen)
 {
@@ -688,7 +643,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     const char *driverName, *deviceName;
     __GLXDRIscreen *screen;
     size_t buffer_size;
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     const __DRIconfig **driConfigs;
 
     screen = calloc(1, sizeof *screen);
@@ -764,11 +718,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     screen->base.GLXmajor = 1;
     screen->base.GLXminor = 4;
     
-    screen->enterVT = pScrn->EnterVT;
-    pScrn->EnterVT = glxDRIEnterVT; 
-    screen->leaveVT = pScrn->LeaveVT;
-    pScrn->LeaveVT = glxDRILeaveVT;
-
     LogMessage(X_INFO,
 	       "AIGLX: Loaded and initialized %s\n", driverName);
 
-- 
1.7.5.4



More information about the xorg-devel mailing list