diff options
author | Niels Ole Salscheider <niels_ole@salscheider-online.de> | 2013-05-18 21:19:23 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-05-20 10:44:57 -0400 |
commit | fc986034540102cd090237bf3f70262e1ae80d9c (patch) | |
tree | 4698f43fab9c2ba576525c7734cee6e63344e62d /drivers/gpu/drm/radeon/evergreen.c | |
parent | 6ab7631014d0648e916f674c4bce0518739a2142 (diff) | |
download | lwn-fc986034540102cd090237bf3f70262e1ae80d9c.tar.gz lwn-fc986034540102cd090237bf3f70262e1ae80d9c.zip |
drm/radeon: Fix VRAM size calculation for VRAM >= 4GB
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>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 105bafb6c29d..06c261bed289 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -3405,8 +3405,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); |