summaryrefslogtreecommitdiff
path: root/src/i830_dga.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_dga.c')
-rw-r--r--src/i830_dga.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/i830_dga.c b/src/i830_dga.c
index 1129fa31..1a6e4e69 100644
--- a/src/i830_dga.c
+++ b/src/i830_dga.c
@@ -253,12 +253,25 @@ static void
I830_Sync(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
+ int flags = MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE;
MARKER();
- if (pI830->AccelInfoRec) {
- (*pI830->AccelInfoRec->Sync) (pScrn);
- }
+ if (pI830->noAccel)
+ return;
+
+ if (IS_I965G(pI830))
+ flags = 0;
+
+ BEGIN_LP_RING(2);
+ OUT_RING(MI_FLUSH | flags);
+ OUT_RING(MI_NOOP); /* pad to quadword */
+ ADVANCE_LP_RING();
+
+ I830WaitLpRing(pScrn, pI830->LpRing->mem.Size - 8, 0);
+
+ pI830->LpRing->space = pI830->LpRing->mem.Size - 8;
+ pI830->nextColorExpandBuf = 0;
}
static void