diff options
author | Alex Deucher <alex@samba.(none)> | 2006-09-17 17:30:08 -0400 |
---|---|---|
committer | Alex Deucher <alex@samba.(none)> | 2006-09-17 17:30:08 -0400 |
commit | bb1eac0b6b0d2ab02bd7b47f3c2e4b3f40e7486f (patch) | |
tree | 9f69b3bde9d638d3b9a9a5e1f811b360517f860c | |
parent | 5108d1dd581a6e649f89812affba8481491e1bd7 (diff) |
re-order SavageMapMem() so that ram detection works again.
-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; |