drm/amdgpu: call amdgpu_vm_prt_fini before deleting the root PD
Subsystems (2)
PATCH 1/1 drm/amdgpu: call amdgpu_vm_prt_fini before deleting the root PD
amdgpu_vm_prt_fini uses "vm->root.base.bo" so it must still be valid when we call it.
Fixes b65709a92156 ("drm/amdgpu: reserve the root PD while freeing PASIDs")
Signed-off-by Pierre-Eric Pelloux-Prayer <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +10 -9
@@ -2975,6 +2975,16 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) vm->pasid =0 ; } +list_for_each_entry_safe (mapping, tmp, &vm->freed, list) { +if (mapping->flags &AMDGPU_PTE_PRT && prt_fini_needed) { +amdgpu_vm_prt_fini (adev, vm); + prt_fini_needed = false; + } + +list_del (&mapping->list); +amdgpu_vm_free_mapping (adev, vm, mapping,NULL ); + } +amdgpu_vm_free_pts (adev, vm,NULL );amdgpu_bo_unreserve (root);amdgpu_bo_unref (&root);
@@ -2994,15 +3004,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)list_del (&mapping->list);kfree (mapping); } -list_for_each_entry_safe (mapping, tmp, &vm->freed, list) { -if (mapping->flags &AMDGPU_PTE_PRT && prt_fini_needed) { -amdgpu_vm_prt_fini (adev, vm); - prt_fini_needed = false; - } - -list_del (&mapping->list); -amdgpu_vm_free_mapping (adev, vm, mapping,NULL ); - }dma_fence_put (vm->last_update);for (i =0 ; i <AMDGPU_MAX_VMHUBS ; i++)
Signature · 6 lines
2.23.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191023120221.13537-1-pierre-eric.pelloux-prayer-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 23.10.19 um 14:02 schrieb Pelloux-prayer, Pierre-eric:
Quoted 5 lines
amdgpu_vm_prt_finiuses "vm->root.base.bo" so it must still be valid when we call it.Fixes b65709a92156 ("drm/amdgpu: reserve the root PD while freeing PASIDs")Signed-off-by Pierre-Eric Pelloux-Prayer <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 31 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +10
-2@@ -2975,6 +2975,16 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) vm->pasid =0 ; } +list_for_each_entry_safe (mapping, tmp, &vm->freed, list) { +if (mapping->flags &AMDGPU_PTE_PRT && prt_fini_needed) { +amdgpu_vm_prt_fini (adev, vm); + prt_fini_needed = false; + } + +list_del (&mapping->list); +amdgpu_vm_free_mapping (adev, vm, mapping,NULL ); + } +amdgpu_vm_free_pts (adev, vm,NULL );amdgpu_bo_unreserve (root);amdgpu_bo_unref (&root);@@ -2994,15 +3004,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)list_del (&mapping->list);kfree (mapping); } -list_for_each_entry_safe (mapping, tmp, &vm->freed, list) { -if (mapping->flags &AMDGPU_PTE_PRT && prt_fini_needed) {
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) · line 3009
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-7-amdgpu_vm_prt_fini (adev, vm); - prt_fini_needed = false; - } - -list_del (&mapping->list); -amdgpu_vm_free_mapping (adev, vm, mapping,NULL ); - }dma_fence_put (vm->last_update);for (i =0 ; i <AMDGPU_MAX_VMHUBS ; i++)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx