diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 7424577..80f427f 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -1333,8 +1333,9 @@ 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); + uint64_t lower = aper0_base >> 24; + uint64_t upper = (aper0_base + mem_size - 1) >> 8; + info->mc_fb_location = (lower & 0xffff) | (upper & 0xffff0000); ErrorF("mc fb loc is %08x\n", (unsigned int)info->mc_fb_location); } else { info->mc_fb_location = (aper0_base >> 16) | @@ -1345,21 +1346,16 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn) if (info->ChipFamily >= CHIP_FAMILY_R600) { info->fbLocation = (info->mc_fb_location & 0xffff) << 24; } else { - info->fbLocation = (info->mc_fb_location & 0xffff) << 16; + info->fbLocation = (info->mc_fb_location & 0xffff) << 16; } /* Just disable the damn AGP apertures for now, it may be * re-enabled later by the DRM */ - if (IS_AVIVO_VARIANT) { - if (info->ChipFamily >= CHIP_FAMILY_R600) { - OUTREG(R600_HDP_NONSURFACE_BASE, (info->mc_fb_location << 16) & 0xff0000); - } else { - OUTREG(AVIVO_HDP_FB_LOCATION, info->mc_fb_location); - } - info->mc_agp_location = 0x003f0000; - } else - info->mc_agp_location = 0xffffffc0; + if (IS_AVIVO_VARIANT) + info->mc_agp_location = 0x003f0000; + else + info->mc_agp_location = 0xffffffc0; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RADEONInitMemoryMap() : \n"); xf86DrvMsg(pScrn->scrnIndex, X_INFO,