diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-09-30 19:30:35 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-09-30 19:30:35 -0400 |
commit | e843faf355c864beab81e74f0e39f8ad53d4c2bf (patch) | |
tree | 7fa8f60ef0422f283addf64f5194a2c3acaf77a5 /src/radeon_driver.c | |
parent | 886febc882053e09294225e85b102f965041b62b (diff) |
radeon: fix fbLocation for >32 bit MC addresses
If the fbLocation was at an address >32 bits, we'd fail.
Change fbLocation to uint64_t and properly cast when needed.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 7d6c32d7..6efb1729 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -1517,9 +1517,9 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn) } } if (info->ChipFamily >= CHIP_FAMILY_R600) { - info->fbLocation = (info->mc_fb_location & 0xffff) << 24; + info->fbLocation = ((uint64_t)info->mc_fb_location & 0xffff) << 24; } else { - info->fbLocation = (info->mc_fb_location & 0xffff) << 16; + info->fbLocation = ((uint64_t)info->mc_fb_location & 0xffff) << 16; } /* Just disable the damn AGP apertures for now, it may be * re-enabled later by the DRM @@ -4218,9 +4218,9 @@ static void RADEONAdjustMemMapRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save) info->mc_fb_location = fb; info->mc_agp_location = agp; if (info->ChipFamily >= CHIP_FAMILY_R600) - info->fbLocation = (info->mc_fb_location & 0xffff) << 24; + info->fbLocation = ((uint64_t)info->mc_fb_location & 0xffff) << 24; else - info->fbLocation = (info->mc_fb_location & 0xffff) << 16; + info->fbLocation = ((uint64_t)info->mc_fb_location & 0xffff) << 16; info->accel_state->dst_pitch_offset = (((pScrn->displayWidth * info->CurrentLayout.pixel_bytes / 64) |