Skip to content

Commit a445923

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amdgpu/vm: Check PRT uAPI flag instead of PTE flag
This fixes sparse mappings (aka. partially resident textures). Check the correct flags. Since a recent refactor, the code works with uAPI flags (for mapping buffer objects), and not PTE (page table entry) flags. Fixes: 6716a82 ("drm/amdgpu: rework how PTE flags are generated v3") Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 8feeab26c80635b802f72b3ed986c693ff8f3212)
1 parent 80d8a9a commit a445923

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
20782078
struct amdgpu_bo *bo = before->bo_va->base.bo;
20792079

20802080
amdgpu_vm_it_insert(before, &vm->va);
2081-
if (before->flags & AMDGPU_PTE_PRT_FLAG(adev))
2081+
if (before->flags & AMDGPU_VM_PAGE_PRT)
20822082
amdgpu_vm_prt_get(adev);
20832083

20842084
if (amdgpu_vm_is_bo_always_valid(vm, bo) &&
@@ -2093,7 +2093,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
20932093
struct amdgpu_bo *bo = after->bo_va->base.bo;
20942094

20952095
amdgpu_vm_it_insert(after, &vm->va);
2096-
if (after->flags & AMDGPU_PTE_PRT_FLAG(adev))
2096+
if (after->flags & AMDGPU_VM_PAGE_PRT)
20972097
amdgpu_vm_prt_get(adev);
20982098

20992099
if (amdgpu_vm_is_bo_always_valid(vm, bo) &&

0 commit comments

Comments
 (0)