summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-09-18 19:41:21 +1000
committerDave Airlie <airlied@linux.ie>2006-09-18 19:43:45 +1000
commit9c0c805704f1df1b66adc2a6b9313597ae5b86cc (patch)
treee8caf071ef37390d9640585a29c493c1232d914a
parent25fa71ca0a24190cc8be2e80769443e0e09303b3 (diff)
radeon: fix rn50 memmap
This should fixup the rn50/m6/m7 memory map problem that has been reported since BenH's memory mapping changes
-rw-r--r--src/radeon_driver.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 89fa9f51..8468c285 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2273,6 +2273,7 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
unsigned long mem_size;
+ CARD32 aper_size;
/* Default to existing values */
info->mc_fb_location = INREG(RADEON_MC_FB_LOCATION);
@@ -2282,13 +2283,18 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
* but the real video RAM instead
*/
mem_size = INREG(RADEON_CONFIG_MEMSIZE);
+ aper_size = INREG(RADEON_CONFIG_APER_SIZE);
if (mem_size == 0)
mem_size = 0x800000;
+ /* Fix for RN50, M6, M7 with 8/16/32(??) MBs of VRAM -
+ Novell bug 204882 + along with lots of ubuntu ones */
+ if (aper_size > mem_size)
+ mem_size = aper_size;
+
#ifdef XF86DRI
/* Apply memory map limitation if using an old DRI */
if (info->directRenderingEnabled && !info->newMemoryMap) {
- CARD32 aper_size = INREG(RADEON_CONFIG_APER_SIZE);
if (aper_size < mem_size)
mem_size = aper_size;
}