diff options
| author | Dave Airlie <airlied@linux.ie> | 2008-01-16 13:34:58 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@linux.ie> | 2008-01-16 13:34:58 +1000 |
| commit | 585e03e6878dd257c694517be9ea231a6b3cfb66 (patch) | |
| tree | d8b31c1a3886f2c898ec9bab472b468fb4a08ee5 | |
| parent | ef98280b03318ae39d9b8ba45b13a9e27f520107 (diff) | |
switch bios reading over
| -rw-r--r-- | src/sis_driver.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/sis_driver.c b/src/sis_driver.c index be1f059..0b3225a 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -4219,7 +4219,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Could not allocate memory for video BIOS image\n"); } else { - ULong segstart; UShort mypciid = pSiS->Chipset; UShort mypcivendor = (pSiS->ChipFlags & SiSCF_IsXGI) ? PCI_VENDOR_XGI : PCI_VENDOR_SIS; Bool found = FALSE, readpci = FALSE; @@ -4242,7 +4241,15 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) biossize = 0x8000; break; } - +#if XSERVER_LIBPCIACCESS + if(readpci) { + pSiS->PciInfo->rom_size = biossize; + pci_device_read_rom(pSiS->PciInfo, pSiS->BIOS); + if(SISCheckBIOS(pSiS, mypciid, mypcivendor, biossize)) { + found = TRUE; + } + } +#else if(readpci) { xf86ReadPciBIOS(0, pSiS->PciTag, 0, pSiS->BIOS, biossize); if(SISCheckBIOS(pSiS, mypciid, mypcivendor, biossize)) { @@ -4251,6 +4258,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) } if(!found) { + ULong segstart; for(segstart = BIOS_BASE; segstart < 0x000f0000; segstart += 0x00001000) { #if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0) @@ -4265,7 +4273,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) break; } } - +#endif if(found) { UShort romptr = pSiS->BIOS[0x16] | (pSiS->BIOS[0x17] << 8); pSiS->SiS_Pr->VirtualRomBase = pSiS->BIOS; |
