From 6900ff3c5e574881b1470e2363b200e99ab8bf3e Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Mon, 3 Jul 2006 13:09:47 +0200 Subject: Bug #6872: Disable digital output while reading ROM with Radeon 7000. This is a workaround for ATI Radeon 7000 erratum F1. --- src/radeon_driver.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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; -- cgit v1.2.3