[PATCH 2/2] drm/amdgpu: fix 64bit shift for CZ

StDenis, Tom Tom.StDenis at amd.com
Tue Jan 24 14:47:26 UTC 2017


Works on my CZ system:


Ack-by: Tom St Denis <tom.stdenis at amd.com>


________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Christian König <deathsimple at vodafone.de>
Sent: Tuesday, January 24, 2017 09:09
To: amd-gfx at lists.freedesktop.org
Subject: [PATCH 2/2] drm/amdgpu: fix 64bit shift for CZ

From: Christian König <christian.koenig at amd.com>

Fixes "access stolen VRAM directly on CZ", otherwise that won't
work as expected with more than 4GB RAM.

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index a564e89..7669b32 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -470,7 +470,7 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)

 #ifdef CONFIG_X86_64
         if (adev->flags & AMD_IS_APU) {
-               adev->mc.aper_base = RREG32(mmMC_VM_FB_OFFSET) << 22ULL;
+               adev->mc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
                 adev->mc.aper_size = adev->mc.real_vram_size;
         }
 #endif
--
2.5.0

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - lists.freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
To see the collection of prior postings to the list, visit the amd-gfx Archives. Using amd-gfx: To post a message to all the list members, send email ...



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170124/1db47038/attachment-0001.html>


More information about the amd-gfx mailing list