Lines Matching defs:fence
168 * @fence: the dependency fence
169 * @entity: the entity which depends on the above fence
173 bool drm_sched_dependency_optimized(struct dma_fence* fence,
179 if (!fence || dma_fence_is_signaled(fence))
181 if (fence->context == entity->fence_context)
183 s_fence = to_drm_sched_fence(fence);
418 * Wait for job's HW fence callback to finish using s_job
421 * Job is still alive so fence refcount at least 1
466 struct dma_fence *fence = s_job->s_fence->parent;
473 if (fence) {
474 r = dma_fence_add_callback(fence, &s_job->cb,
477 drm_sched_process_job(fence, &s_job->cb);
479 DRM_ERROR("fence add callback failed (%d)\n",
506 struct dma_fence *fence;
520 fence = sched->ops->run_job(s_job);
522 if (IS_ERR_OR_NULL(fence)) {
523 if (IS_ERR(fence))
524 dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));
528 s_job->s_fence->parent = fence;
640 * @f: fence
641 * @cb: fence callbacks
774 struct dma_fence *fence;
805 fence = sched->ops->run_job(sched_job);
808 if (!IS_ERR_OR_NULL(fence)) {
809 s_fence->parent = dma_fence_get(fence);
810 r = dma_fence_add_callback(fence, &sched_job->cb,
813 drm_sched_process_job(fence, &sched_job->cb);
815 DRM_ERROR("fence add callback failed (%d)\n",
817 dma_fence_put(fence);
819 if (IS_ERR(fence))
820 dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));