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

Adam Jackson ajax at redhat.com
Tue Oct 16 11:56:24 PDT 2012


This was necessary in DRI1 for a variety of reasons (SAREA ownership,
VRAM layout, etc).  None of that is relevant to DRI2.  Which is good,
because VT switch is an xf86-ism and I'd like to make DRI2
ddx-independent.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/glxdri2.c | 49 -------------------------------------------------
 1 file changed, 49 deletions(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index bce1bfa..0ce40ca 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -75,9 +75,6 @@ struct __GLXDRIscreen {
     void *driver;
     int fd;
 
-    xf86EnterVTProc *enterVT;
-    xf86LeaveVTProc *leaveVT;
-
     const __DRIcoreExtension *core;
     const __DRIdri2Extension *dri2;
     const __DRI2flushExtension *flush;
@@ -805,46 +802,6 @@ static const __DRIextension *loader_extensions[] = {
     NULL
 };
 
-static Bool
-glxDRIEnterVT(ScrnInfoPtr scrn)
-{
-    Bool ret;
-    __GLXDRIscreen *screen = (__GLXDRIscreen *)
-        glxGetScreen(xf86ScrnToScreen(scrn));
-
-    LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
-
-    scrn->EnterVT = screen->enterVT;
-
-    ret = scrn->EnterVT(scrn);
-
-    screen->enterVT = scrn->EnterVT;
-    scrn->EnterVT = glxDRIEnterVT;
-
-    if (!ret)
-        return FALSE;
-
-    glxResumeClients();
-
-    return TRUE;
-}
-
-static void
-glxDRILeaveVT(ScrnInfoPtr scrn)
-{
-    __GLXDRIscreen *screen = (__GLXDRIscreen *)
-        glxGetScreen(xf86ScrnToScreen(scrn));
-
-    LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
-
-    glxSuspendClients();
-
-    scrn->LeaveVT = screen->leaveVT;
-    (*screen->leaveVT) (scrn);
-    screen->leaveVT = scrn->LeaveVT;
-    scrn->LeaveVT = glxDRILeaveVT;
-}
-
 static void
 initializeExtensions(__GLXDRIscreen * screen)
 {
@@ -928,7 +885,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     const char *driverName, *deviceName;
     __GLXDRIscreen *screen;
     size_t buffer_size;
-    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 
     screen = calloc(1, sizeof *screen);
     if (screen == NULL)
@@ -1002,11 +958,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);
 
     return &screen->base;
-- 
1.7.12.1



More information about the xorg-devel mailing list