From 36f8c1f9037b0a05738ad479320c398f7a4642c1 Mon Sep 17 00:00:00 2001 From: Chunming Zhou Date: Mon, 27 Mar 2017 11:53:12 +0800 Subject: [PATCH] drm/amdgpu: adapt vm size for multi vmpt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 5b4eb7ad24cd..ab090fcb78ad 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -500,6 +500,12 @@ static int gmc_v9_0_vm_init(struct amdgpu_device *adev) * amdkfd will use VMIDs 8-15 */ adev->vm_manager.num_ids = AMDGPU_NUM_OF_VMIDS; + /* Because of four level VMPTs, vm size at least is 256GB. + 256TB is OK as well */ + if (amdgpu_vm_size < 256) { + DRM_WARN("vm size at least is 256GB!\n"); + amdgpu_vm_size = 256; + } adev->vm_manager.num_level = 1; amdgpu_vm_manager_init(adev); -- 2.30.2