[PATCH 13/15] drm/amdgpu: adapt vm size for multi vmpt

Chunming Zhou David1.Zhou at amd.com
Mon Mar 27 05:53:23 UTC 2017


Change-Id: I17b40aec68404e46961a9fda22dfadd1ae9d6f2c
Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
---
 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 6625a2f..613c8f6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -508,6 +508,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);
 
-- 
1.9.1



More information about the amd-gfx mailing list