summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-09-30 19:30:35 -0400
committerAlex Deucher <alexdeucher@gmail.com>2010-09-30 19:30:35 -0400
commite843faf355c864beab81e74f0e39f8ad53d4c2bf (patch)
tree7fa8f60ef0422f283addf64f5194a2c3acaf77a5 /src/radeon_driver.c
parent886febc882053e09294225e85b102f965041b62b (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.c8
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)