--- radeon_driver.c.orig 2007-01-18 13:20:45.000000000 +0100 +++ radeon_driver.c 2007-01-18 13:48:56.000000000 +0100 @@ -2296,6 +2296,7 @@ static void RADEONInitMemoryMap(ScrnInfo RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; unsigned long agp_size, agp_base, mem_size; + CARD32 aper_size; /* Default to existing values */ info->mc_fb_location = INREG(RADEON_MC_FB_LOCATION); @@ -2305,13 +2306,18 @@ static void RADEONInitMemoryMap(ScrnInfo * 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; }