summaryrefslogtreecommitdiff
blob: b09deafb725bcd0117f319646285c2d781434a50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
--- src/mga_dri.c
+++ src/mga_dri.c
@@ -363,7 +363,6 @@ void MGAGetQuiescence( ScrnInfoPtr pScrn
 {
    MGAPtr pMga = MGAPTR(pScrn);
 
-   DRILock( screenInfo.screens[pScrn->scrnIndex], 0 );
    pMga->haveQuiescense = 1;
 
    if ( pMga->directRenderingEnabled ) {
@@ -401,8 +400,6 @@ void MGAGetQuiescenceShared( ScrnInfoPtr
    MGAEntPtr pMGAEnt = pMga->entityPrivate;
    MGAPtr pMGA2 = MGAPTR(pMGAEnt->pScrn_2);
 
-   DRILock( screenInfo.screens[pMGAEnt->pScrn_1->scrnIndex], 0 );
-
    pMga = MGAPTR(pMGAEnt->pScrn_1);
    pMga->haveQuiescense = 1;
    pMGA2->haveQuiescense = 1;
@@ -442,7 +439,11 @@ static void MGASwapContextShared( Screen
    pMGA2->AccelInfoRec->NeedToSync = TRUE;
 }
 
-/* This is really only called from validate/postvalidate as we
+/* FIXME: This comment is out of date, since we aren't overriding
+ * Block/Wakeuphandler anymore.
+ *
+ *
+ * This is really only called from validate/postvalidate as we
  * override the dri lock/unlock.  Want to remove validate/postvalidate
  * processing, but need to remove all client-side use of drawable lock
  * first (otherwise there is noone recover when a client dies holding
@@ -464,14 +465,12 @@ MGADRISwapContext( ScreenPtr pScreen, DR
 		   DRIContextType oldContextType, void *oldContext,
 		   DRIContextType newContextType, void *newContext )
 {
-#if 0
    if ( syncType == DRI_3D_SYNC &&
 	oldContextType == DRI_2D_CONTEXT &&
 	newContextType == DRI_2D_CONTEXT )
    {
       MGASwapContext( pScreen );
    }
-#endif
 }
 
 static void
@@ -479,58 +478,12 @@ MGADRISwapContextShared( ScreenPtr pScre
 			  DRIContextType oldContextType, void *oldContext,
 			  DRIContextType newContextType, void *newContext )
 {
-#if 0
    if ( syncType == DRI_3D_SYNC &&
 	oldContextType == DRI_2D_CONTEXT &&
 	newContextType == DRI_2D_CONTEXT )
    {
       MGASwapContextShared( pScreen );
    }
-#endif
-}
-
-
-static void MGAWakeupHandler( int screenNum, pointer wakeupData,
-			      unsigned long result, pointer pReadmask )
-{
-    ScreenPtr pScreen = screenInfo.screens[screenNum];
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-    MGAPtr pMga = MGAPTR(pScrn);
-
-    if ( xf86IsEntityShared( pScrn->entityList[0] ) 
-		&& pMga->DualHeadEnabled) {
-        MGASwapContextShared( pScreen );
-    } else {
-        MGASwapContext( pScreen );
-    }
-}
-
-static void MGABlockHandler( int screenNum, pointer blockData,
-			     pointer pTimeout, pointer pReadmask )
-
-{
-   ScreenPtr pScreen = screenInfo.screens[screenNum];
-   ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-   MGAPtr pMga = MGAPTR(pScrn);
-   MGAEntPtr pMGAEnt;
-
-   if ( pMga->haveQuiescense ) {
-      if ( xf86IsEntityShared( pScrn->entityList[0] ) ) {
-	 /* Restore to first screen */
-	 pMga->RestoreAccelState( pScrn );
-	 xf86SetLastScrnFlag( pScrn->entityList[0], pScrn->scrnIndex );
-	 pMGAEnt = pMga->entityPrivate;
-
-	 if ( pMGAEnt->directRenderingEnabled ) {
-	    DRIUnlock( screenInfo.screens[pMGAEnt->pScrn_1->scrnIndex] );
-	 }
-      } else {
-	 if ( pMga->directRenderingEnabled ) {
-	    DRIUnlock( pScreen );
-	 }
-      }
-      pMga->haveQuiescense = 0;
-   }
 }
 
 void MGASelectBuffer( ScrnInfoPtr pScrn, int which )
@@ -1030,8 +983,6 @@ Bool MGADRIScreenInit( ScreenPtr pScreen
    pDRIInfo->frameBufferStride = pScrn->displayWidth*(pScrn->bitsPerPixel/8);
    pDRIInfo->ddxDrawableTableEntry = MGA_MAX_DRAWABLES;
 
-   pDRIInfo->wrap.BlockHandler = MGABlockHandler;
-   pDRIInfo->wrap.WakeupHandler = MGAWakeupHandler;
    pDRIInfo->wrap.ValidateTree = NULL;
    pDRIInfo->wrap.PostValidateTree = NULL;