diff options
author | Ian Romanick <idr@us.ibm.com> | 2006-12-11 13:16:53 -0800 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2006-12-11 13:16:53 -0800 |
commit | 36c444e80324c82f7d02d9d95372123c923336a0 (patch) | |
tree | 1989fec6bbe1d5546e431ca774441aa2550c10bc /src/savage_driver.c | |
parent | f2191d412832312b494f313841d094f87f64a5ff (diff) | |
parent | e361a9523394a2f0558f7d2648bf6a43ebe31f2e (diff) |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-savage into pci-rework
Conflicts:
src/savage_driver.c
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; |