diff options
author | Luc Verhaegen <libv@skynet.be> | 2005-08-28 16:03:55 +0000 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2005-08-28 16:03:55 +0000 |
commit | 572b5270c193afb25063452e177b2b06e3b16d2b (patch) | |
tree | d37a2ef9cf4e1813498a3a56cfd549028cc3ddc8 | |
parent | 55f20a9de437c170d09f4eede3786a0b2f080d02 (diff) |
[devel-Vsync_restore_fix] Sometimes bit 9 of vsync isn't properly restored.
Mostly when ambient temperature is high. This has been happening on
both CLE266A3 and KM400. In VIARestore, after vgaHWRestore, we check
the contents of CR07 and, if not matching the contents of
hwp->SavedReg.Crtc[0x07], we write it out again.
-rw-r--r-- | src/via_driver.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/via_driver.c b/src/via_driver.c index 518e734..fdb5d5c 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -1670,6 +1670,16 @@ VIARestore(ScrnInfoPtr pScrn) else vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_MODE); + /* Both a CLE266A3 and a KM400A sometimes bork up here, + * leaving VT unusable. Probably temperature related. -- Luc */ + if (hwp->readCrtc(hwp, 0x07) != hwp->SavedReg.CRTC[0x07]) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "%s: CR07 didn't restore correctly," + " trying again.\n", __FUNCTION__); + /* it's 2005 already, we can leave CR00-07 unprotected */ + ViaCrtcMask(hwp, 0x11, 0x00, 0x80); + hwp->writeCrtc(hwp, 0x07, hwp->SavedReg.CRTC[0x07]); + } + /* restore extended regs */ hwp->writeSeq(hwp, 0x14, Regs->SR14); hwp->writeSeq(hwp, 0x15, Regs->SR15); |