From 42b2b4a92f95cccefad87f92e1f68be06c1206aa Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Thu, 14 Dec 2017 14:04:01 -0500 Subject: [PATCH 3041/4131] drm/amdkfd: Do not change amdgpu_vm_size on Raven in KFD plugin code After the logic in amdgpu_vm_adjust_size() changed in amdgpu side, on Raven there will be only 64G vm size, which will be a problem for ATC memory access. So we should keep amdgpu_vm_size to be -1 in amdgpu_check_vm_size() so that later on the vm size for Raven will be still 256TB in amdgpu_vm_adjust_size(). Change-Id: I830dded4acdeee16e9f9b4b2d8d9985f239735ce Signed-off-by: Yong Zhao Conflicts: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 366b45b..f4e0868 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -767,7 +767,7 @@ static void amdgpu_device_check_vm_size(struct amdgpu_device *adev) if (amdgpu_vm_size == -1) return; - if (amdgpu_vm_size < 1) { + if (amdgpu_vm_size != -1 && amdgpu_vm_size < 1) { dev_warn(adev->dev, "VM size (%d) too small, min is 1GB\n", amdgpu_vm_size); amdgpu_vm_size = -1; @@ -814,7 +814,7 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev) /* Compute the GPU VM space only if the user * hasn't changed it from the default. */ - if (amdgpu_vm_size == -1) { + if (amdgpu_vm_size == -1 && adev->asic_type != CHIP_RAVEN) { /* Computation depends on the amount of physical RAM available. * Cannot exceed 1TB. */ -- 2.7.4