Lines Matching full:active

18  * Active refs memory management
21 * they idle (when we know the active requests are inactive) and allocate the
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()
270 /* While active, the tree can only be built; not destroyed */ in __active_lookup()
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()
431 struct i915_active_fence *active; in i915_active_ref() local
439 active = active_instance(ref, idx); in i915_active_ref()
440 if (!active) { in i915_active_ref()
445 if (replace_barrier(ref, active)) { in i915_active_ref()
446 RCU_INIT_POINTER(active->fence, NULL); in i915_active_ref()
449 if (!__i915_active_fence_set(active, fence)) in i915_active_ref()
459 struct i915_active_fence *active, in __i915_active_set_fence() argument
464 if (replace_barrier(ref, active)) { in __i915_active_set_fence()
465 RCU_INIT_POINTER(active->fence, fence); in __i915_active_set_fence()
470 prev = __i915_active_fence_set(active, fence); in __i915_active_set_fence()
499 /* Only valid while active, see i915_active_acquire_for_context() */ in __i915_active_ref()
531 if (!ref->active) { in i915_active_acquire()
541 err = ref->active(ref); in i915_active_acquire()
553 struct i915_active_fence *active; in i915_active_acquire_for_context() local
560 active = active_instance(ref, idx); in i915_active_acquire_for_context()
561 if (!active) { in i915_active_acquire_for_context()
566 return 0; /* return with active ref */ in i915_active_acquire_for_context()
575 static void enable_signaling(struct i915_active_fence *active) in enable_signaling() argument
579 if (unlikely(is_barrier(active))) in enable_signaling()
582 fence = i915_active_fence_get(active); in enable_signaling()
641 * After the wait is complete, the caller may free the active. in __i915_active_wait()
648 static int __await_active(struct i915_active_fence *active, in __await_active() argument
654 if (is_barrier(active)) /* XXX flush the barrier? */ in __await_active()
657 fence = i915_active_fence_get(active); in __await_active()
806 * i915_active, due to overlapping active phases there is likely a in reuse_idle_barrier()
1036 * __i915_active_fence_set: Update the last active fence along its timeline
1037 * @active: the active tracker
1040 * Records the new @fence as the last active fence along its timeline in
1041 * this active tracker, moving the tracking callbacks from the previous
1048 __i915_active_fence_set(struct i915_active_fence *active, in __i915_active_fence_set() argument
1054 if (fence == rcu_access_pointer(active->fence)) in __i915_active_fence_set()
1061 * C already resident as the active->fence. in __i915_active_fence_set()
1080 prev = xchg(__active_fence_slot(active), fence); in __i915_active_fence_set()
1084 __list_del_entry(&active->cb.node); in __i915_active_fence_set()
1087 list_add_tail(&active->cb.node, &fence->cb_list); in __i915_active_fence_set()
1093 int i915_active_fence_set(struct i915_active_fence *active, in i915_active_fence_set() argument
1099 /* Must maintain timeline ordering wrt previous active requests */ in i915_active_fence_set()
1101 fence = __i915_active_fence_set(active, &rq->fence); in i915_active_fence_set()