summaryrefslogtreecommitdiff
path: root/src/mga_dri.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-10-10 11:43:52 -0700
committerIan Romanick <idr@us.ibm.com>2006-10-10 11:43:52 -0700
commit8fee907cac7e5924630e3648bfb72ad9bd021ea8 (patch)
tree868822813637ebb4692801ee2122f1f8defbcc4e /src/mga_dri.c
parent7cecee186c889902bed9b7fa042f0bd3cc0297ef (diff)
parent2fc0ebfbe850c138e840b6653ed1476623aa04a4 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
Diffstat (limited to 'src/mga_dri.c')
-rw-r--r--src/mga_dri.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/mga_dri.c b/src/mga_dri.c
index 56ad243..e8cd828 100644
--- a/src/mga_dri.c
+++ b/src/mga_dri.c
@@ -370,6 +370,9 @@ void MGAGetQuiescence( ScrnInfoPtr pScrn )
MGAWaitForIdleDMA( pScrn );
+ /* FIXME what about EXA? */
+#ifdef USE_XAA
+ if (!pMga->Exa && pMga->AccelInfoRec) {
WAITFIFO( 11 );
OUTREG( MGAREG_MACCESS, pMga->MAccess );
OUTREG( MGAREG_PITCH, pLayout->displayWidth );
@@ -390,7 +393,9 @@ void MGAGetQuiescence( ScrnInfoPtr pScrn )
OUTREG( MGAREG_YTOP, 0x00000000 ); /* minPixelPointer */
OUTREG( MGAREG_YBOT, 0x007FFFFF ); /* maxPixelPointer */
- pMga->AccelFlags &= ~CLIPPER_ON;
+ pMga->AccelFlags &= ~CLIPPER_ON;
+ }
+#endif
}
}
@@ -406,7 +411,12 @@ void MGAGetQuiescenceShared( ScrnInfoPtr pScrn )
if ( pMGAEnt->directRenderingEnabled ) {
MGAWaitForIdleDMA( pMGAEnt->pScrn_1 );
- pMga->RestoreAccelState( pScrn );
+
+ /* FIXME what about EXA? */
+#ifdef USE_XAA
+ if (!pMga->Exa && pMga->AccelInfoRec)
+ pMga->RestoreAccelState( pScrn );
+#endif
xf86SetLastScrnFlag( pScrn->entityList[0], pScrn->scrnIndex );
}
}
@@ -420,7 +430,8 @@ static void MGASwapContext( ScreenPtr pScreen )
* appropriate.
*/
pMga->haveQuiescense = 0;
- pMga->AccelInfoRec->NeedToSync = TRUE;
+
+ MGA_MARK_SYNC(pMga, pScrn);
}
static void MGASwapContextShared( ScreenPtr pScreen )
@@ -432,11 +443,10 @@ static void MGASwapContextShared( ScreenPtr pScreen )
pMga = MGAPTR(pMGAEnt->pScrn_1);
- pMga->haveQuiescense = 0;
- pMga->AccelInfoRec->NeedToSync = TRUE;
+ pMga->haveQuiescense = pMGA2->haveQuiescense = 0;
- pMGA2->haveQuiescense = 0;
- pMGA2->AccelInfoRec->NeedToSync = TRUE;
+ MGA_MARK_SYNC(pMga, pScrn);
+ MGA_MARK_SYNC(pMGA2, pMGAEnt->pScrn_2);
}
/* FIXME: This comment is out of date, since we aren't overriding
@@ -486,6 +496,7 @@ MGADRISwapContextShared( ScreenPtr pScreen, DRISyncType syncType,
}
}
+#ifdef USE_XAA
void MGASelectBuffer( ScrnInfoPtr pScrn, int which )
{
MGAPtr pMga = MGAPTR(pScrn);
@@ -507,6 +518,7 @@ void MGASelectBuffer( ScrnInfoPtr pScrn, int which )
break;
}
}
+#endif
static unsigned int mylog2( unsigned int n )