LGTM but some else should check.
Acked-by: Sunil Khatri <sunil.kha...@amd.com>

On 8/28/2025 8:31 PM, Christian König wrote:
We should leave such checks to lockdep and not implement something
manually.

Signed-off-by: Christian König <christian.koe...@amd.com>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 +------------
  1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 16451c9bbe1f..a0339187eccd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -651,18 +651,7 @@ int amdgpu_vm_validate(struct amdgpu_device *adev, struct 
amdgpu_vm *vm,
                spin_unlock(&vm->status_lock);
bo = bo_base->bo;
-
-               if (dma_resv_locking_ctx(bo->tbo.base.resv) != ticket) {
-                       struct amdgpu_task_info *ti = 
amdgpu_vm_get_task_info_vm(vm);
-
-                       pr_warn_ratelimited("Evicted user BO is not 
reserved\n");
-                       if (ti) {
-                               pr_warn_ratelimited("pid %d\n", ti->pid);
-                               amdgpu_vm_put_task_info(ti);
-                       }
-
-                       return -EINVAL;
-               }
+               dma_resv_assert_held(bo->tbo.base.resv);
r = validate(param, bo);
                if (r)

Reply via email to