xf86-video-intel: src/i830_driver.c
Jesse Barnes
jbarnes at kemper.freedesktop.org
Thu Nov 8 10:02:52 PST 2007
src/i830_driver.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
New commits:
commit eecd3ccedee6c4acf101591f7e60673660379e62
Author: Jesse Barnes <jbarnes at hobbes.virtuousgeek.org>
Date: Thu Nov 8 09:31:08 2007 -0800
Check DPLL status before writing PIPEnCONF regs
If the DPLL isn't enabled or is in VGA mode, writing the PIPEnCONF registers
may cause a hang or crash. So ensure the DPLL is in the proper state before
writing them.
Another excellent fix from Peter Clifton.
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 488232d..53c7845 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2052,7 +2052,13 @@ RestoreHWState(ScrnInfoPtr pScrn)
OUTREG(DSPASURF, pI830->saveDSPASURF);
OUTREG(DSPATILEOFF, pI830->saveDSPATILEOFF);
}
- OUTREG(PIPEACONF, pI830->savePIPEACONF);
+ /*
+ * Make sure the DPLL is active and not in VGA mode or the
+ * write of PIPEnCONF may cause a crash
+ */
+ if ((pI830->saveDPLL_B & DPLL_VCO_ENABLE) &&
+ (pI830->saveDPLL_B & DPLL_VGA_MODE_DIS))
+ OUTREG(PIPEACONF, pI830->savePIPEACONF);
i830WaitForVblank(pScrn);
OUTREG(DSPACNTR, pI830->saveDSPACNTR);
OUTREG(DSPABASE, INREG(DSPABASE));
@@ -2092,7 +2098,13 @@ RestoreHWState(ScrnInfoPtr pScrn)
OUTREG(DSPBSURF, pI830->saveDSPBSURF);
OUTREG(DSPBTILEOFF, pI830->saveDSPBTILEOFF);
}
- OUTREG(PIPEBCONF, pI830->savePIPEBCONF);
+
+ /*
+ * See PIPEnCONF note above
+ */
+ if ((pI830->saveDPLL_B & DPLL_VCO_ENABLE) &&
+ (pI830->saveDPLL_B & DPLL_VGA_MODE_DIS))
+ OUTREG(PIPEBCONF, pI830->savePIPEBCONF);
i830WaitForVblank(pScrn);
OUTREG(DSPBCNTR, pI830->saveDSPBCNTR);
OUTREG(DSPBBASE, INREG(DSPBBASE));
More information about the xorg-commit
mailing list