• Home
  • Raw
  • Download

Lines Matching refs:fence

45 	return IS_ERR(rcu_access_pointer(active->fence));  in is_barrier()
138 GEM_BUG_ON(rcu_access_pointer(ref->excl.fence)); in __active_retire()
206 return (struct dma_fence ** __force)&active->fence; in __active_fence_slot()
210 active_fence_cb(struct dma_fence *fence, struct dma_fence_cb *cb) in active_fence_cb() argument
215 return cmpxchg(__active_fence_slot(active), fence, NULL) == fence; in active_fence_cb()
219 node_retire(struct dma_fence *fence, struct dma_fence_cb *cb) in node_retire() argument
221 if (active_fence_cb(fence, cb)) in node_retire()
226 excl_retire(struct dma_fence *fence, struct dma_fence_cb *cb) in excl_retire() argument
228 if (active_fence_cb(fence, cb)) in excl_retire()
427 int i915_active_ref(struct i915_active *ref, u64 idx, struct dma_fence *fence) in i915_active_ref() argument
445 RCU_INIT_POINTER(active->fence, NULL); in i915_active_ref()
450 fence = __i915_active_fence_set(active, fence); in i915_active_ref()
451 if (!fence) in i915_active_ref()
454 dma_fence_put(fence); in i915_active_ref()
464 struct dma_fence *fence) in __i915_active_set_fence() argument
469 RCU_INIT_POINTER(active->fence, fence); in __i915_active_set_fence()
473 prev = __i915_active_fence_set(active, fence); in __i915_active_set_fence()
497 __i915_active_ref(struct i915_active *ref, u64 idx, struct dma_fence *fence) in __i915_active_ref() argument
500 return __i915_active_set_fence(ref, __active_fence(ref, idx), fence); in __i915_active_ref()
577 struct dma_fence *fence; in enable_signaling() local
582 fence = i915_active_fence_get(active); in enable_signaling()
583 if (!fence) in enable_signaling()
586 dma_fence_enable_sw_signaling(fence); in enable_signaling()
587 dma_fence_put(fence); in enable_signaling()
649 int (*fn)(void *arg, struct dma_fence *fence), in __await_active() argument
652 struct dma_fence *fence; in __await_active() local
657 fence = i915_active_fence_get(active); in __await_active()
658 if (fence) { in __await_active()
661 err = fn(arg, fence); in __await_active()
662 dma_fence_put(fence); in __await_active()
689 static int __await_barrier(struct i915_active *ref, struct i915_sw_fence *fence) in __await_barrier() argument
698 if (!i915_sw_fence_await(fence)) { in __await_barrier()
705 wb->base.private = fence; in __await_barrier()
714 int (*fn)(void *arg, struct dma_fence *fence), in await_active() argument
723 rcu_access_pointer(ref->excl.fence)) { in await_active()
754 static int rq_await_fence(void *arg, struct dma_fence *fence) in rq_await_fence() argument
756 return i915_request_await_dma_fence(arg, fence); in rq_await_fence()
766 static int sw_await_fence(void *arg, struct dma_fence *fence) in sw_await_fence() argument
768 return i915_sw_fence_await_dma_fence(arg, fence, 0, in sw_await_fence()
772 int i915_sw_fence_await_active(struct i915_sw_fence *fence, in i915_sw_fence_await_active() argument
776 return await_active(ref, flags, sw_await_fence, fence, fence); in i915_sw_fence_await_active()
911 RCU_INIT_POINTER(node->base.fence, NULL); in i915_active_acquire_preallocate_barrier()
927 RCU_INIT_POINTER(node->base.fence, ERR_PTR(-EAGAIN)); in i915_active_acquire_preallocate_barrier()
931 GEM_BUG_ON(rcu_access_pointer(node->base.fence) != ERR_PTR(-EAGAIN)); in i915_active_acquire_preallocate_barrier()
1029 smp_store_mb(*ll_to_fence_slot(node), &rq->fence); in i915_request_add_active_barriers()
1030 list_add_tail((struct list_head *)node, &rq->fence.cb_list); in i915_request_add_active_barriers()
1050 struct dma_fence *fence) in __i915_active_fence_set() argument
1071 if (fence == prev) in __i915_active_fence_set()
1072 return fence; in __i915_active_fence_set()
1074 GEM_BUG_ON(test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)); in __i915_active_fence_set()
1088 spin_lock_irqsave(fence->lock, flags); in __i915_active_fence_set()
1102 while (cmpxchg(__active_fence_slot(active), prev, fence) != prev) { in __i915_active_fence_set()
1107 spin_unlock_irqrestore(fence->lock, flags); in __i915_active_fence_set()
1110 GEM_BUG_ON(prev == fence); in __i915_active_fence_set()
1112 spin_lock_irqsave(fence->lock, flags); in __i915_active_fence_set()
1133 list_add_tail(&active->cb.node, &fence->cb_list); in __i915_active_fence_set()
1134 spin_unlock_irqrestore(fence->lock, flags); in __i915_active_fence_set()
1142 struct dma_fence *fence; in i915_active_fence_set() local
1146 fence = __i915_active_fence_set(active, &rq->fence); in i915_active_fence_set()
1147 if (fence) { in i915_active_fence_set()
1148 err = i915_request_await_dma_fence(rq, fence); in i915_active_fence_set()
1149 dma_fence_put(fence); in i915_active_fence_set()
1155 void i915_active_noop(struct dma_fence *fence, struct dma_fence_cb *cb) in i915_active_noop() argument
1157 active_fence_cb(fence, cb); in i915_active_noop()