mirror of
https://github.com/X11Libre/xf86-video-sis.git
synced 2026-03-24 01:25:01 +00:00
switch bios reading over
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user