summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2006-08-25 22:40:17 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2006-08-25 22:40:17 +0200
commit693f165e2c6c431e6c61c835781883c2bcef5876 (patch)
treeabcdc04f327a20c43f19643ecb01fc109d9fac1c /src
parent7fbd85b3621f5368ebce178e5e55b0cbd5a80733 (diff)
Fixed corruption on copy, by copying kdrive's waitmarker code.
Diffstat (limited to 'src')
-rw-r--r--src/mga_exa.c9
-rw-r--r--src/mga_reg.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mga_exa.c b/src/mga_exa.c
index d89e42a..20534dc 100644
--- a/src/mga_exa.c
+++ b/src/mga_exa.c
@@ -720,9 +720,14 @@ static void
mgaWaitMarker(ScreenPtr pScreen, int marker)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ MGAPtr pMga = pScrn->driverPrivate;
+
+ WAITFIFO(1);
+
+ OUTREG(MGAREG_CACHEFLUSH, 0);
- /* FIXME: is this correct? */
- CHECK_DMA_QUIESCENT(MGAPTR(pScrn), pScrn);
+ /* wait until the "drawing engine busy" bit is unset */
+ while (INREG (MGAREG_Status) & 0x10000);
}
Bool
diff --git a/src/mga_reg.h b/src/mga_reg.h
index 7fe729a..857fe64 100644
--- a/src/mga_reg.h
+++ b/src/mga_reg.h
@@ -109,6 +109,7 @@
#define MGAREG_FIFOSTATUS 0x1e10
#define MGAREG_Status 0x1e14
+#define MGAREG_CACHEFLUSH 0x1fff
#define MGAREG_ICLEAR 0x1e18
#define MGAREG_IEN 0x1e1c