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 2ac254d..c76147f 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -1587,6 +1587,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; @@ -1773,6 +1780,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); @@ -1783,13 +1793,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); @@ -2834,9 +2837,6 @@ static Bool SavageMapMem(ScrnInfoPtr pScrn) psav->ApertureMap += 0x1000000; } - pScrn->fbOffset = (psav->IsSecondary) - ? pScrn->videoRam * 1024 : 0; - pScrn->memPhysBase = psav->PciInfo->regions[0].base_addr; return TRUE; |