aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/evergreen.c
diff options
context:
space:
mode:
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>2013-05-18 21:19:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-24 11:36:03 -0700
commita7656384c9590f293e1e8cb11acb875322b8ec41 (patch)
treef2f1c567504be445c6f6a55fb94c447d0c6cd395 /drivers/gpu/drm/radeon/evergreen.c
parent429d8945a2cc016ebb0c732c12e4356704f03685 (diff)
downloadvexpress-lsk-a7656384c9590f293e1e8cb11acb875322b8ec41.tar.gz
drm/radeon: Fix VRAM size calculation for VRAM >= 4GB
commit fc986034540102cd090237bf3f70262e1ae80d9c upstream. Add ULL prefix to avoid overflow. Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index aeaa3862b83..0ea6bdf5fd7 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2400,8 +2400,8 @@ int evergreen_mc_init(struct radeon_device *rdev)
rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE);
} else {
/* size in MB on evergreen/cayman/tn */
- rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
- rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
+ rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE) * 1024ULL * 1024ULL;
+ rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE) * 1024ULL * 1024ULL;
}
rdev->mc.visible_vram_size = rdev->mc.aper_size;
r700_vram_gtt_location(rdev, &rdev->mc);