diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2017-03-26 23:43:35 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:55:29 -0400 |
commit | f7effef8d6e38d7d3120c604ad7d0b299b349e14 (patch) | |
tree | a654e1d5e5364e956a90aeae831fa8050056e055 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | a1adf8bef2f3c635dca372d36737c70e6d32bc95 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) | |||
1042 | 1042 | ||
1043 | static void amdgpu_get_block_size(struct amdgpu_device *adev) | 1043 | static void amdgpu_get_block_size(struct amdgpu_device *adev) |
1044 | { | 1044 | { |
1045 | /* from AI, asic starts to support multiple level VMPT */ | ||
1046 | if (adev->family >= AMDGPU_FAMILY_AI) { | ||
1047 | if (amdgpu_vm_block_size != 9) | ||
1048 | dev_warn(adev->dev, "Multi-VMPT limits block size to" | ||
1049 | "one page!\n"); | ||
1050 | amdgpu_vm_block_size = 9; | ||
1051 | return; | ||
1052 | } | ||
1045 | /* defines number of bits in page table versus page directory, | 1053 | /* defines number of bits in page table versus page directory, |
1046 | * a page is 4KB so we have 12 bits offset, minimum 9 bits in the | 1054 | * a page is 4KB so we have 12 bits offset, minimum 9 bits in the |
1047 | * page table and the remaining bits are in the page directory */ | 1055 | * page table and the remaining bits are in the page directory */ |