diff options
author | Niels Ole Salscheider <niels_ole@salscheider-online.de> | 2013-05-18 15:19:23 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-05-20 10:44:57 -0400 |
commit | fc986034540102cd090237bf3f70262e1ae80d9c (patch) | |
tree | 4698f43fab9c2ba576525c7734cee6e63344e62d /drivers/gpu/drm/radeon/si.c | |
parent | 6ab7631014d0648e916f674c4bce0518739a2142 (diff) |
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/si.c')
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index f0b6c2f87c4d..113ed9f1f0d1 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -3397,8 +3397,8 @@ static int si_mc_init(struct radeon_device *rdev) | |||
3397 | rdev->mc.aper_base = pci_resource_start(rdev->pdev, 0); | 3397 | rdev->mc.aper_base = pci_resource_start(rdev->pdev, 0); |
3398 | rdev->mc.aper_size = pci_resource_len(rdev->pdev, 0); | 3398 | rdev->mc.aper_size = pci_resource_len(rdev->pdev, 0); |
3399 | /* size in MB on si */ | 3399 | /* size in MB on si */ |
3400 | rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024; | 3400 | rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE) * 1024ULL * 1024ULL; |
3401 | rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024; | 3401 | rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE) * 1024ULL * 1024ULL; |
3402 | rdev->mc.visible_vram_size = rdev->mc.aper_size; | 3402 | rdev->mc.visible_vram_size = rdev->mc.aper_size; |
3403 | si_vram_gtt_location(rdev, &rdev->mc); | 3403 | si_vram_gtt_location(rdev, &rdev->mc); |
3404 | radeon_update_bandwidth_info(rdev); | 3404 | radeon_update_bandwidth_info(rdev); |