diff options
author | Alex Williamson <alex.williamson@hp.com> | 2006-07-03 13:09:47 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2006-07-03 13:09:47 +0200 |
commit | 6900ff3c5e574881b1470e2363b200e99ab8bf3e (patch) | |
tree | 6d477317212adeb2592d9346054bc435352d0531 | |
parent | 920ac1f56fad6f48a30e65836ce054815f270738 (diff) |
Bug #6872: Disable digital output while reading ROM with Radeon 7000.
This is a workaround for ATI Radeon 7000 erratum F1.
-rw-r--r-- | src/radeon_driver.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 645f9ff..8601113 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -4414,11 +4414,30 @@ static Bool RADEONPreInitInt10(ScrnInfoPtr pScrn, xf86Int10InfoPtr *ppInt10) { #if !defined(__powerpc__) RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 fp2_gen_ctl_save = 0; if (xf86LoadSubModule(pScrn, "int10")) { xf86LoaderReqSymLists(int10Symbols, NULL); + + /* The VGA BIOS on the RV100/QY cannot be read when the digital output + * is enabled. Clear and restore FP2_ON around int10 to avoid this. + */ + if (info->PciInfo->chipType == PCI_CHIP_RV100_QY) { + fp2_gen_ctl_save = INREG(RADEON_FP2_GEN_CNTL); + if (fp2_gen_ctl_save & RADEON_FP2_ON) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "disabling digital out\n"); + OUTREG(RADEON_FP2_GEN_CNTL, fp2_gen_ctl_save & ~RADEON_FP2_ON); + } + } + xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n"); *ppInt10 = xf86InitInt10(info->pEnt->index); + + if (fp2_gen_ctl_save & RADEON_FP2_ON) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "re-enabling digital out\n"); + OUTREG(RADEON_FP2_GEN_CNTL, fp2_gen_ctl_save); + } } #endif return TRUE; |