Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: allow huge invalid mappings on GMC8

Only GMC9 supports true huge pages, but we can still free invalid mappings
on GMC8.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
8ce1f7e7 adc7bfe5

+2 -1
+2 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 1636 1636 1637 1637 shift = amdgpu_vm_level_shift(adev, cursor.level); 1638 1638 parent_shift = amdgpu_vm_level_shift(adev, cursor.level - 1); 1639 - if (adev->asic_type < CHIP_VEGA10) { 1639 + if (adev->asic_type < CHIP_VEGA10 && 1640 + (flags & AMDGPU_PTE_VALID)) { 1640 1641 /* No huge page support before GMC v9 */ 1641 1642 if (cursor.level != AMDGPU_VM_PTB) { 1642 1643 if (!amdgpu_vm_pt_descendant(adev, &cursor))