Commit f7effef8 authored by Chunming Zhou's avatar Chunming Zhou Committed by Alex Deucher

drm/amdgpu: limit block size to one page

Signed-off-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarJunwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a1adf8be
...@@ -1042,6 +1042,14 @@ static bool amdgpu_check_pot_argument(int arg) ...@@ -1042,6 +1042,14 @@ static bool amdgpu_check_pot_argument(int arg)
static void amdgpu_get_block_size(struct amdgpu_device *adev) 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, /* 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 * 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 */ * page table and the remaining bits are in the page directory */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment