summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2017-03-28 20:31:20 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-03-29 23:55:52 -0400
commit9ceaeeafbd1177e53395946a772a2a9c4c234887 (patch)
treea0480c7ae158e1b800f25cc3de79d2d286712f25 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent22770e5a750e905a1aaa66e20b88d080e42ddd15 (diff)
downloadlinux-9ceaeeafbd1177e53395946a772a2a9c4c234887.tar.bz2
drm/amdgpu: Fix Vega10 VM initialization
adev->family is not initialized yet when amdgpu_get_block_size is called. Use adev->asic_type instead. Minimum VM size is 512GB, not 256GB, for a single page table entry in the root page table. gmc_v9_0_vm_init is called after adev->vm_manager.max_pfn is initialized. Move the minimum VM-size enforcement ahead of max_pfn initializtion. Cast to 64-bit before the left-shift. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ae31744dac28..93061a439dbc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1043,10 +1043,10 @@ 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 (adev->asic_type >= CHIP_VEGA10) {
if (amdgpu_vm_block_size != 9)
- dev_warn(adev->dev, "Multi-VMPT limits block size to"
- "one page!\n");
+ dev_warn(adev->dev,
+ "Multi-VMPT limits block size to one page!\n");
amdgpu_vm_block_size = 9;
return;
}