浏览代码

drm/amdgpu: limit block size to one page

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Chunming Zhou 8 年之前
父节点
当前提交
f7effef8d6
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

+ 8 - 0
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

@@ -1042,6 +1042,14 @@ static bool amdgpu_check_pot_argument(int arg)
 
 static void amdgpu_get_block_size(struct amdgpu_device *adev)
 {
+	/* from AI, asic starts to support multiple level VMPT */
+	if (adev->family >= AMDGPU_FAMILY_AI) {
+		if (amdgpu_vm_block_size != 9)
+			dev_warn(adev->dev, "Multi-VMPT limits block size to"
+				 "one page!\n");
+		amdgpu_vm_block_size = 9;
+		return;
+	}
 	/* defines number of bits in page table versus page directory,
 	 * a page is 4KB so we have 12 bits offset, minimum 9 bits in the
 	 * page table and the remaining bits are in the page directory */