Skip to contentSkip to conversation

drm/amdgpu: Drop eviction lock before freeing PD/PT BO

PATCH In review XF 2 participants 2 messages Oct 8

Subsystems (2)
lore
Share & tools
lore

XF

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Drop eviction lock before freeing PD/PT BO

From: xf <[email protected]>

Fix circular locking warning with drm_buddy allocator.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5 -0
index 7d3659ef11e5..2a4f8d365271 100644
@@ -1252,7 +1252,12 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 		tlb_cb = NULL;
 	}
 
+	amdgpu_vm_end_critical(&params);
 	amdgpu_vm_pt_free_list(adev, &params);
+	kfree(tlb_cb);
+	drm_dev_exit(idx);
+
+	return 0;
 
 error_free:
 	kfree(tlb_cb);
Signature · 1 line
2.34.1
#1 lore raw

+ Arun

Quoted 30 lines · XF

From: xf <[email protected]>

Fix circular locking warning with drm_buddy allocator.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5 -1
index 7d3659ef11e5..2a4f8d365271 100644
@@ -1252,7 +1252,12 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
                tlb_cb = NULL;
        }
 
+       amdgpu_vm_end_critical(&params);
        amdgpu_vm_pt_free_list(adev, &params);
+       kfree(tlb_cb);
+       drm_dev_exit(idx);
+
+       return 0;
 
 error_free:
        kfree(tlb_cb);
--

2.34.1