diff options
Diffstat (limited to 'src/savage_driver.c')
-rw-r--r-- | src/savage_driver.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c index a1a1674..20f1680 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -1671,6 +1671,13 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) /* maybe throw in some more sanity checks here */ + if (!SavageMapMem(pScrn)) { + SavageFreeRec(pScrn); + vbeFree(psav->pVbe); + psav->pVbe = NULL; + return FALSE; + } + vgaCRIndex = psav->vgaIOBase + 4; vgaCRReg = psav->vgaIOBase + 5; @@ -1857,6 +1864,9 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) pScrn->videoRam); } + pScrn->fbOffset = (psav->IsSecondary) + ? pScrn->videoRam * 1024 : 0; + /* reset graphics engine to avoid memory corruption */ VGAOUT8(vgaCRIndex, 0x66); cr66 = VGAIN8(vgaCRReg); @@ -1867,13 +1877,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) VGAOUT8(vgaCRReg, cr66 & ~0x02); /* clear reset flag */ usleep(10000); - if (!SavageMapMem(pScrn)) { - SavageFreeRec(pScrn); - vbeFree(psav->pVbe); - psav->pVbe = NULL; - return FALSE; - } - /* Set status word positions based on chip type. */ SavageInitStatus(pScrn); @@ -2924,9 +2927,6 @@ static Bool SavageMapMem(ScrnInfoPtr pScrn) psav->ApertureMap += 0x1000000; } - pScrn->fbOffset = (psav->IsSecondary) - ? pScrn->videoRam * 1024 : 0; - pScrn->memPhysBase = psav->PciInfo->memBase[0]; return TRUE; |