diff options
author | Eric Anholt <eric@anholt.net> | 2006-11-16 15:12:43 -0800 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-01-06 14:39:54 -0800 |
commit | 35cebed70827999812f8343ac97ad0dffda20786 (patch) | |
tree | a44a77e3b9509dcf94661471d2ecc74148739e45 | |
parent | 33e912aca08fa11ef588eb386e16ba5f9ea13727 (diff) |
[PATCH] Replace broken PCI resource size detection with pciGetBaseSize() call.
Signed-off-by: Keith Packard <keithp@neko.keithp.com>
-rw-r--r-- | src/i830_driver.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 94cba05d..6b76d12a 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1189,16 +1189,12 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) } } else { if (IS_I9XX(pI830)) { - if (pI830->PciInfo->memBase[2] & 0x08000000) - pI830->FbMapSize = 0x8000000; /* 128MB aperture */ - else - pI830->FbMapSize = 0x10000000; /* 256MB aperture */ - - if (pI830->PciInfo->chipType == PCI_CHIP_E7221_G) - pI830->FbMapSize = 0x8000000; /* 128MB aperture */ - } else - /* 128MB aperture for later chips */ + pI830->FbMapSize = 1UL << pciGetBaseSize(pI830->PciTag, 2, TRUE, + NULL); + } else { + /* 128MB aperture for later i8xx series. */ pI830->FbMapSize = 0x8000000; + } } if (pI830->PciInfo->chipType == PCI_CHIP_E7221_G) |