From c3b3d479788fcea7e543f29acf83c85b8b148fbe Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 8 Aug 2006 15:28:14 -0700 Subject: Intel bug #35: Fix accelerator syncing with DGA. Fixes glitches seen with Mark Vojkovich's "texture" demo. --- src/i830_dga.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/i830_dga.c') 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 -- cgit v1.2.3