diff --git a/src/i830.h b/src/i830.h index 5b78236..23cdc59 100644 --- a/src/i830.h +++ b/src/i830.h @@ -699,6 +699,7 @@ typedef struct _I830Rec { uint32_t saveRENCLK_GATE_D2; uint32_t saveDSPCLK_GATE_D; uint32_t saveRAMCLK_GATE_D; + uint32_t saveCACHE_MODE_0; uint32_t savePWRCTXA; enum last_3d *last_3d; diff --git a/src/i830_driver.c b/src/i830_driver.c index 3a2a9a4..ad50768 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2271,6 +2271,9 @@ SaveHWState(ScrnInfoPtr pScrn) pI830->saveRAMCLK_GATE_D = INREG(RAMCLK_GATE_D); } + if (IS_I965GM(pI830)) + pI830->saveCACHE_MODE_0 = INREG(CACHE_MODE_0); + if (IS_I965GM(pI830) || IS_GM45(pI830)) pI830->savePWRCTXA = INREG(PWRCTXA); @@ -2337,6 +2340,9 @@ RestoreHWState(ScrnInfoPtr pScrn) OUTREG(DSPCLK_GATE_D, pI830->saveDSPCLK_GATE_D); OUTREG(RENCLK_GATE_D1, pI830->saveRENCLK_GATE_D1); + if (IS_I965GM(pI830)) + OUTREG(CACHE_MODE_0, pI830->saveCACHE_MODE_0); + if (IS_I965G(pI830)) { OUTREG(RENCLK_GATE_D2, pI830->saveRENCLK_GATE_D2); OUTREG(RAMCLK_GATE_D, pI830->saveRAMCLK_GATE_D); @@ -3686,6 +3692,9 @@ I830EnterVT(int scrnIndex, int flags) pScrn->virtualY * pScrn->displayWidth * pI830->cpp); } + if (IS_I965GM(pI830)) + OUTREG(CACHE_MODE_0, 0x6801); /* enable RC workaround */ + if (!xf86SetDesiredModes (pScrn)) return FALSE;