diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 7424577..3ddb2c2 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -1271,8 +1271,10 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn) * but the real video RAM instead */ if (info->ChipFamily >= CHIP_FAMILY_R600) { - mem_size = INREG(R600_CONFIG_MEMSIZE); - aper_size = INREG(R600_CONFIG_APER_SIZE); + //mem_size = INREG(R600_CONFIG_MEMSIZE); + mem_size = (((info->mc_fb_location & 0xffff0000) - ((info->mc_fb_location & 0xffff) << 16))) << 8; + //aper_size = INREG(R600_CONFIG_APER_SIZE); + aper_size = mem_size; } else { mem_size = INREG(RADEON_CONFIG_MEMSIZE); aper_size = INREG(RADEON_CONFIG_APER_SIZE); @@ -1333,8 +1335,8 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn) aper0_base &= ~(mem_size - 1); if (info->ChipFamily >= CHIP_FAMILY_R600) { - info->mc_fb_location = (aper0_base >> 24) | - (((aper0_base + mem_size - 1) & 0xff000000U) >> 8); + info->mc_fb_location = ((aper0_base >> 24) & 0x0000ffff) | + (((aper0_base + mem_size) >> 8) & 0xffff0000); ErrorF("mc fb loc is %08x\n", (unsigned int)info->mc_fb_location); } else { info->mc_fb_location = (aper0_base >> 16) |