Lines Matching refs:exec

205 						struct drm_exec *exec)  in resume_and_reinstall_preempt_fences()  argument
215 drm_gpuvm_resv_add_fence(&vm->gpuvm, exec, q->lr.pfence, in resume_and_reinstall_preempt_fences()
227 struct drm_exec *exec = &vm_exec.exec; in xe_vm_add_compute_exec_queue() local
252 drm_gpuvm_resv_add_fence(&vm->gpuvm, exec, pfence, in xe_vm_add_compute_exec_queue()
267 drm_exec_fini(exec); in xe_vm_add_compute_exec_queue()
366 bool xe_vm_validate_should_retry(struct drm_exec *exec, int err, ktime_t *end) in xe_vm_validate_should_retry() argument
382 static int xe_gpuvm_validate(struct drm_gpuvm_bo *vm_bo, struct drm_exec *exec) in xe_gpuvm_validate() argument
416 int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec, in xe_vm_validate_rebind() argument
424 ret = drm_gpuvm_validate(&vm->gpuvm, exec); in xe_vm_validate_rebind()
433 drm_exec_for_each_locked_object(exec, index, obj) { in xe_vm_validate_rebind()
442 static int xe_preempt_work_begin(struct drm_exec *exec, struct xe_vm *vm, in xe_preempt_work_begin() argument
447 err = drm_gpuvm_prepare_vm(&vm->gpuvm, exec, 0); in xe_preempt_work_begin()
462 err = drm_gpuvm_prepare_objects(&vm->gpuvm, exec, 0); in xe_preempt_work_begin()
476 return xe_vm_validate_rebind(vm, exec, vm->preempt.num_exec_queues); in xe_preempt_work_begin()
482 struct drm_exec exec; in preempt_rebind_work_func() local
508 drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT, 0); in preempt_rebind_work_func()
510 drm_exec_until_all_locked(&exec) { in preempt_rebind_work_func()
513 err = xe_preempt_work_begin(&exec, vm, &done); in preempt_rebind_work_func()
514 drm_exec_retry_on_contention(&exec); in preempt_rebind_work_func()
516 drm_exec_fini(&exec); in preempt_rebind_work_func()
517 if (err && xe_vm_validate_should_retry(&exec, err, &end)) in preempt_rebind_work_func()
561 resume_and_reinstall_preempt_fences(vm, &exec); in preempt_rebind_work_func()
565 drm_exec_fini(&exec); in preempt_rebind_work_func()
1101 int xe_vm_lock_vma(struct drm_exec *exec, struct xe_vma *vma) in xe_vm_lock_vma() argument
1109 err = drm_exec_lock_obj(exec, xe_vm_obj(vm)); in xe_vm_lock_vma()
1111 err = drm_exec_lock_obj(exec, &bo->ttm.base); in xe_vm_lock_vma()
1118 struct drm_exec exec; in xe_vma_destroy_unlocked() local
1121 drm_exec_init(&exec, 0, 0); in xe_vma_destroy_unlocked()
1122 drm_exec_until_all_locked(&exec) { in xe_vma_destroy_unlocked()
1123 err = xe_vm_lock_vma(&exec, vma); in xe_vma_destroy_unlocked()
1124 drm_exec_retry_on_contention(&exec); in xe_vma_destroy_unlocked()
1131 drm_exec_fini(&exec); in xe_vma_destroy_unlocked()
1986 struct drm_exec exec; in new_vma() local
1993 drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT, 0); in new_vma()
1994 drm_exec_until_all_locked(&exec) { in new_vma()
1997 err = drm_exec_lock_obj(&exec, xe_vm_obj(vm)); in new_vma()
1998 drm_exec_retry_on_contention(&exec); in new_vma()
2001 err = drm_exec_lock_obj(&exec, &bo->ttm.base); in new_vma()
2002 drm_exec_retry_on_contention(&exec); in new_vma()
2005 drm_exec_fini(&exec); in new_vma()
2023 drm_exec_fini(&exec); in new_vma()
2356 static int vma_lock_and_validate(struct drm_exec *exec, struct xe_vma *vma, in vma_lock_and_validate() argument
2364 err = drm_exec_lock_obj(exec, &bo->ttm.base); in vma_lock_and_validate()
2387 static int op_lock_and_prep(struct drm_exec *exec, struct xe_vm *vm, in op_lock_and_prep() argument
2394 err = vma_lock_and_validate(exec, op->map.vma, in op_lock_and_prep()
2403 err = vma_lock_and_validate(exec, in op_lock_and_prep()
2407 err = vma_lock_and_validate(exec, op->remap.prev, true); in op_lock_and_prep()
2409 err = vma_lock_and_validate(exec, op->remap.next, true); in op_lock_and_prep()
2416 err = vma_lock_and_validate(exec, in op_lock_and_prep()
2427 err = vma_lock_and_validate(exec, in op_lock_and_prep()
2442 static int vm_bind_ioctl_ops_lock_and_prep(struct drm_exec *exec, in vm_bind_ioctl_ops_lock_and_prep() argument
2449 err = drm_exec_lock_obj(exec, xe_vm_obj(vm)); in vm_bind_ioctl_ops_lock_and_prep()
2454 err = op_lock_and_prep(exec, vm, op); in vm_bind_ioctl_ops_lock_and_prep()
2673 struct drm_exec exec; in vm_bind_ioctl_ops_execute() local
2679 drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT | in vm_bind_ioctl_ops_execute()
2681 drm_exec_until_all_locked(&exec) { in vm_bind_ioctl_ops_execute()
2682 err = vm_bind_ioctl_ops_lock_and_prep(&exec, vm, vops); in vm_bind_ioctl_ops_execute()
2683 drm_exec_retry_on_contention(&exec); in vm_bind_ioctl_ops_execute()
2697 drm_exec_fini(&exec); in vm_bind_ioctl_ops_execute()