xorg: revert bad merge
authorZack Rusin <zackr@vmware.com>
Tue, 25 Aug 2009 13:55:42 +0000 (09:55 -0400)
committerZack Rusin <zackr@vmware.com>
Tue, 25 Aug 2009 13:58:51 +0000 (09:58 -0400)
src/gallium/state_trackers/xorg/xorg_driver.c

index d68fd376973fbe2a75bb1dff71de77a2bbf284e5..53d1a330951a84c68cc9fd5bf11f94ca58184e2b 100644 (file)
@@ -633,6 +633,10 @@ LeaveVT(int scrnIndex, int flags)
 
     RestoreHWState(pScrn);
 
+    if (drmDropMaster(ms->fd))
+       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+                  "drmDropMaster failed: %s\n", strerror(errno));
+
     pScrn->vtSema = FALSE;
 }
 
@@ -645,6 +649,17 @@ EnterVT(int scrnIndex, int flags)
     ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     modesettingPtr ms = modesettingPTR(pScrn);
 
+    if (drmSetMaster(ms->fd)) {
+       if (errno == EINVAL) {
+           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+                      "drmSetMaster failed: 2.6.29 or newer kernel required for "
+                      "multi-server DRI\n");
+       } else {
+           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+                      "drmSetMaster failed: %s\n", strerror(errno));
+       }
+    }
+
     /*
      * Only save state once per server generation since that's what most
      * drivers do.  Could change this to save state at each VT enter.