drm/amdgpu: Avoid endless loop in GPUVM fragment processing
Don't bounce back to the root level for fragment processing, because huge pages are not supported at that level. This is unlikely to happen with the default VM size on Vega, but can be exposed by limiting the VM size with the amdgpu.vm_size module parameter. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9ce2b991f7
commit
1954db153d
|
@ -1656,9 +1656,11 @@ static int amdgpu_vm_update_ptes(struct amdgpu_pte_update_params *params,
|
||||||
if (!amdgpu_vm_pt_descendant(adev, &cursor))
|
if (!amdgpu_vm_pt_descendant(adev, &cursor))
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
continue;
|
continue;
|
||||||
} else if (frag >= parent_shift) {
|
} else if (frag >= parent_shift &&
|
||||||
|
cursor.level - 1 != adev->vm_manager.root_level) {
|
||||||
/* If the fragment size is even larger than the parent
|
/* If the fragment size is even larger than the parent
|
||||||
* shift we should go up one level and check it again.
|
* shift we should go up one level and check it again
|
||||||
|
* unless one level up is the root level.
|
||||||
*/
|
*/
|
||||||
if (!amdgpu_vm_pt_ancestor(&cursor))
|
if (!amdgpu_vm_pt_ancestor(&cursor))
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
Loading…
Reference in New Issue