Skip to content

Commit 930595d

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/amdgpu: remove check for BO reservation add assert instead
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>
1 parent beae798 commit 930595d

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -651,18 +651,7 @@ int amdgpu_vm_validate(struct amdgpu_device *adev, struct amdgpu_vm *vm,
651651
spin_unlock(&vm->status_lock);
652652

653653
bo = bo_base->bo;
654-
655-
if (dma_resv_locking_ctx(bo->tbo.base.resv) != ticket) {
656-
struct amdgpu_task_info *ti = amdgpu_vm_get_task_info_vm(vm);
657-
658-
pr_warn_ratelimited("Evicted user BO is not reserved\n");
659-
if (ti) {
660-
pr_warn_ratelimited("pid %d\n", ti->task.pid);
661-
amdgpu_vm_put_task_info(ti);
662-
}
663-
664-
return -EINVAL;
665-
}
654+
dma_resv_assert_held(bo->tbo.base.resv);
666655

667656
r = validate(param, bo);
668657
if (r)

0 commit comments

Comments
 (0)