From: Chunming Zhou Date: Mon, 27 Mar 2017 03:43:35 +0000 (+0800) Subject: drm/amdgpu: limit block size to one page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7effef8d6e38d7d3120c604ad7d0b299b349e14;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: limit block size to one page Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 4bf9805b7028..abb51bd77ca7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/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 */