summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2006-11-21 04:51:02 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-02-05 19:28:59 +0200
commit2c8b33b761e4411451aea1eea3a89d629aeea40d (patch)
treebfa0ec37ebbde68dde42afe3d27ef2cde0da2f69 /src
parenta659b7235332e19659c56cc9d7af362bd8885a29 (diff)
Minor refactoring of pATI->Block0Base computation.
Diffstat (limited to 'src')
-rw-r--r--src/atipreinit.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/atipreinit.c b/src/atipreinit.c
index b9111fc3..62c32bb4 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -400,22 +400,6 @@ ATIPreInit
return TRUE;
}
- pATI->Block0Base = 0; /* Might no longer be valid */
- if ((pVideo = pATI->PCIInfo))
- {
- if (pATI->CPIODecoding == BLOCK_IO)
- pATI->CPIOBase = pVideo->ioBase[1];
-
- /* Set MMIO address from PCI configuration space, if available */
- if ((pATI->Block0Base = pVideo->memBase[2]))
- {
- if (pATI->Block0Base >= (CARD32)(-1 << pVideo->size[2]))
- pATI->Block0Base = 0;
- else
- pATI->Block0Base += 0x0400U;
- }
- }
-
#ifdef AVOID_CPIO
pScreenInfo->racMemFlags =
@@ -438,16 +422,29 @@ ATIPreInit
/* Finish probing the adapter */
{
+
+ if (pATI->CPIODecoding == BLOCK_IO)
+ pATI->CPIOBase = pVideo->ioBase[1];
+
+ /* Set MMIO address from PCI configuration space, if available */
+ if ((pATI->Block0Base = pVideo->memBase[2]))
+ {
+ if (pATI->Block0Base >= (CARD32)(-1 << pVideo->size[2]))
+ pATI->Block0Base = 0;
+ else
+ pATI->Block0Base += 0x0400U;
+ }
+
+ Block0Base = pATI->Block0Base; /* save */
+
do
{
/*
* Find and mmap() MMIO area. Allow only auxiliary aperture if
* it exists.
*/
- if (!(Block0Base = pATI->Block0Base))
+ if (!pATI->Block0Base)
{
- if (pVideo)
- {
/* Check tail end of linear (8MB or 4MB) aperture */
if ((pATI->Block0Base = pVideo->memBase[0]))
{
@@ -461,7 +458,6 @@ ATIPreInit
if (pATI->pBlock[0])
break;
}
- }
/* Check VGA MMIO aperture */
pATI->Block0Base = 0x000BFC00U;
@@ -469,7 +465,8 @@ ATIPreInit
ATIMach64Map(pScreenInfo->scrnIndex, pATI);
} while (0);
- pATI->Block0Base = Block0Base;
+
+ pATI->Block0Base = Block0Base; /* restore */
#ifdef AVOID_CPIO