diff options
author | Dave Airlie <airlied@linux.ie> | 2006-09-18 19:41:21 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-10-04 03:47:00 +1000 |
commit | 10ba4f0a435d7c1ed9f4a36a8d607f0f0b63be30 (patch) | |
tree | 50b38d4fd48b28f7a4e1eaf22f3194db1e8cd2c3 | |
parent | 654b1a65c7d093793d15961422c2606ec2bc744a (diff) |
radeon: fix rn50 memmapati-1-0-branch
This should fixup the rn50/m6/m7 memory map problem that has been reported
since BenH's memory mapping changes
(cherry picked from 9c0c805704f1df1b66adc2a6b9313597ae5b86cc commit)
-rw-r--r-- | src/radeon_driver.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 03d1e89..6d62701 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -2296,7 +2296,8 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; - unsigned long agp_size, agp_base, mem_size; + unsigned long mem_size; + CARD32 aper_size; /* Default to existing values */ info->mc_fb_location = INREG(RADEON_MC_FB_LOCATION); @@ -2306,13 +2307,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; } @@ -2361,8 +2367,6 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn) RADEONTRACE(("RADEONInitMemoryMap() : \n")); RADEONTRACE((" mem_size : 0x%08lx\n", mem_size)); - RADEONTRACE((" agp_size : 0x%08lx\n", agp_size)); - RADEONTRACE((" agp_base : 0x%08lx\n", agp_base)); RADEONTRACE((" MC_FB_LOCATION : 0x%08lx\n", info->mc_fb_location)); RADEONTRACE((" MC_AGP_LOCATION : 0x%08lx\n", info->mc_agp_location)); } |