Lines Matching refs:active

36 node_from_active(struct i915_active_fence *active)  in node_from_active()  argument
38 return container_of(active, struct active_node, base); in node_from_active()
43 static inline bool is_barrier(const struct i915_active_fence *active) in is_barrier() argument
45 return IS_ERR(rcu_access_pointer(active->fence)); in is_barrier()
79 return (void *)ref->active ?: (void *)ref->retire ?: (void *)ref; in active_debug_hint()
205 __active_fence_slot(struct i915_active_fence *active) in __active_fence_slot() argument
207 return (struct dma_fence ** __force)&active->fence; in __active_fence_slot()
213 struct i915_active_fence *active = in active_fence_cb() local
214 container_of(cb, typeof(*active), cb); in active_fence_cb()
216 return cmpxchg(__active_fence_slot(active), fence, NULL) == fence; in active_fence_cb()
340 int (*active)(struct i915_active *ref), in __i915_active_init()
349 ref->active = active; in __i915_active_init()
415 replace_barrier(struct i915_active *ref, struct i915_active_fence *active) in replace_barrier() argument
417 if (!is_barrier(active)) /* proto-node used by our idle barrier? */ in replace_barrier()
425 __active_del_barrier(ref, node_from_active(active)); in replace_barrier()
432 struct i915_active_fence *active; in i915_active_add_request() local
440 active = active_instance(ref, i915_request_timeline(rq)->fence_context); in i915_active_add_request()
441 if (!active) { in i915_active_add_request()
446 if (replace_barrier(ref, active)) { in i915_active_add_request()
447 RCU_INIT_POINTER(active->fence, NULL); in i915_active_add_request()
450 if (!__i915_active_fence_set(active, fence)) in i915_active_add_request()
460 struct i915_active_fence *active, in __i915_active_set_fence() argument
465 if (replace_barrier(ref, active)) { in __i915_active_set_fence()
466 RCU_INIT_POINTER(active->fence, fence); in __i915_active_set_fence()
471 prev = __i915_active_fence_set(active, fence); in __i915_active_set_fence()
509 if (!ref->active) { in i915_active_acquire()
519 err = ref->active(ref); in i915_active_acquire()
531 struct i915_active_fence *active; in i915_active_acquire_for_context() local
538 active = active_instance(ref, idx); in i915_active_acquire_for_context()
539 if (!active) { in i915_active_acquire_for_context()
553 static void enable_signaling(struct i915_active_fence *active) in enable_signaling() argument
557 if (unlikely(is_barrier(active))) in enable_signaling()
560 fence = i915_active_fence_get(active); in enable_signaling()
626 static int __await_active(struct i915_active_fence *active, in __await_active() argument
632 if (is_barrier(active)) /* XXX flush the barrier? */ in __await_active()
635 fence = i915_active_fence_get(active); in __await_active()
1026 __i915_active_fence_set(struct i915_active_fence *active, in __i915_active_fence_set() argument
1032 if (fence == rcu_access_pointer(active->fence)) in __i915_active_fence_set()
1058 prev = xchg(__active_fence_slot(active), fence); in __i915_active_fence_set()
1062 __list_del_entry(&active->cb.node); in __i915_active_fence_set()
1065 list_add_tail(&active->cb.node, &fence->cb_list); in __i915_active_fence_set()
1071 int i915_active_fence_set(struct i915_active_fence *active, in i915_active_fence_set() argument
1079 fence = __i915_active_fence_set(active, &rq->fence); in i915_active_fence_set()