]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu: remove check for BO reservation add assert instead
authorChristian König <christian.koenig@amd.com>
Wed, 27 Aug 2025 08:17:48 +0000 (10:17 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 16 Sep 2025 21:51:35 +0000 (17:51 -0400)
We should leave such checks to lockdep and not implement something
manually.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 9980c0cded94e0b1e8ad09b51de1312649348c1d..d0c95fb0ef813f24f7602cb3f1d2c058c0f34ade 100644 (file)
@@ -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->task.pid);
-                               amdgpu_vm_put_task_info(ti);
-                       }
-
-                       return -EINVAL;
-               }
+               dma_resv_assert_held(bo->tbo.base.resv);
 
                r = validate(param, bo);
                if (r)