aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-12-03 14:37:22 -0500
committerDave Airlie <airlied@redhat.com>2010-12-07 18:35:05 -0500
commit8961d52d4cc52edf5672f8f2712c57162b736793 (patch)
treebb70f07b4b6097a2c71aada6570b3cd15a74dc09 /drivers/gpu
parentdd7cc55a258400440aff5869d3e1e111142297cd (diff)
drm/radeon/kms: fix vram base calculation on rs780/rs880
Avoid overflowing a 32 bit value. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/r600.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index a3552594ccc4..a322d4f647bd 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1195,8 +1195,10 @@ void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
1195 mc->vram_end, mc->real_vram_size >> 20); 1195 mc->vram_end, mc->real_vram_size >> 20);
1196 } else { 1196 } else {
1197 u64 base = 0; 1197 u64 base = 0;
1198 if (rdev->flags & RADEON_IS_IGP) 1198 if (rdev->flags & RADEON_IS_IGP) {
1199 base = (RREG32(MC_VM_FB_LOCATION) & 0xFFFF) << 24; 1199 base = RREG32(MC_VM_FB_LOCATION) & 0xFFFF;
1200 base <<= 24;
1201 }
1200 radeon_vram_location(rdev, &rdev->mc, base); 1202 radeon_vram_location(rdev, &rdev->mc, base);
1201 rdev->mc.gtt_base_align = 0; 1203 rdev->mc.gtt_base_align = 0;
1202 radeon_gtt_location(rdev, mc); 1204 radeon_gtt_location(rdev, mc);