These flags seem to be necessary for retry faults to work.
Signed-off-by: Timur Kristóf <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index f5e9b97e92a8c..80c07abc81565 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -3002,7 +3002,8 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev,
u32 pasid,
}
addr /= AMDGPU_GPU_PAGE_SIZE;
- flags = AMDGPU_PTE_VALID | AMDGPU_PTE_SNOOPED |
+ flags = adev->gmc.init_pte_flags |
+ AMDGPU_PTE_VALID | AMDGPU_PTE_SNOOPED |
AMDGPU_PTE_SYSTEM;
if (is_compute_context) {
@@ -3017,6 +3018,8 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev,
u32 pasid,
flags |= AMDGPU_PTE_EXECUTABLE | AMDGPU_PTE_READABLE |
AMDGPU_PTE_WRITEABLE;
+ if (adev->family >= AMDGPU_FAMILY_NV)
+ flags |= AMDGPU_PTE_NOALLOC;
} else {
/* Let the hw retry silently on the PTE */
value = 0;
--
2.53.0