summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <idr@umwelt.(none)>2006-08-10 10:19:55 -0700
committerIan Romanick <idr@umwelt.(none)>2006-08-10 10:19:55 -0700
commit7cecee186c889902bed9b7fa042f0bd3cc0297ef (patch)
treeb0ac8f7207332589432ce2cf57f5346c85263561 /src
parent160b1f79fab7266a24b7d1a680cdf29bad9707c1 (diff)
parentbde592047cd62194d7ef67520a9fdbaf269a8b90 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
Diffstat (limited to 'src')
-rw-r--r--src/mga_dri.c59
1 files changed, 5 insertions, 54 deletions
diff --git a/src/mga_dri.c b/src/mga_dri.c
index 87b02d8..56ad243 100644
--- a/src/mga_dri.c
+++ b/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 pScrn )
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( ScreenPtr pScreen )
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, DRISyncType syncType,
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 pScreen, DRISyncType syncType,
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 )
@@ -1017,8 +970,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;