Lines Matching full:active

19  * Active refs memory management
22 * they idle (when we know the active requests are inactive) and allocate the
40 node_from_active(struct i915_active_fence *active) in node_from_active() argument
42 return container_of(active, struct active_node, base); in node_from_active()
47 static inline bool is_barrier(const struct i915_active_fence *active) in is_barrier() argument
49 return IS_ERR(rcu_access_pointer(active->fence)); in is_barrier()
83 return (void *)ref->active ?: (void *)ref->retire ?: (void *)ref; in active_debug_hint()
210 __active_fence_slot(struct i915_active_fence *active) in __active_fence_slot() argument
212 return (struct dma_fence ** __force)&active->fence; in __active_fence_slot()
218 struct i915_active_fence *active = in active_fence_cb() local
219 container_of(cb, typeof(*active), cb); in active_fence_cb()
221 return cmpxchg(__active_fence_slot(active), fence, NULL) == fence; in active_fence_cb()
277 /* While active, the tree can only be built; not destroyed */ in __active_lookup()
347 int (*active)(struct i915_active *ref), in __i915_active_init()
357 ref->active = active; in __i915_active_init()
425 replace_barrier(struct i915_active *ref, struct i915_active_fence *active) in replace_barrier() argument
427 if (!is_barrier(active)) /* proto-node used by our idle barrier? */ in replace_barrier()
435 __active_del_barrier(ref, node_from_active(active)); in replace_barrier()
441 struct i915_active_fence *active; in i915_active_ref() local
449 active = active_instance(ref, idx); in i915_active_ref()
450 if (!active) { in i915_active_ref()
455 if (replace_barrier(ref, active)) { in i915_active_ref()
456 RCU_INIT_POINTER(active->fence, NULL); in i915_active_ref()
459 if (!__i915_active_fence_set(active, fence)) in i915_active_ref()
469 struct i915_active_fence *active, in __i915_active_set_fence() argument
474 if (replace_barrier(ref, active)) { in __i915_active_set_fence()
475 RCU_INIT_POINTER(active->fence, fence); in __i915_active_set_fence()
480 prev = __i915_active_fence_set(active, fence); in __i915_active_set_fence()
509 /* Only valid while active, see i915_active_acquire_for_context() */ in __i915_active_ref()
541 if (!ref->active) { in i915_active_acquire()
551 err = ref->active(ref); in i915_active_acquire()
563 struct i915_active_fence *active; in i915_active_acquire_for_context() local
570 active = active_instance(ref, idx); in i915_active_acquire_for_context()
571 if (!active) { in i915_active_acquire_for_context()
576 return 0; /* return with active ref */ in i915_active_acquire_for_context()
585 static void enable_signaling(struct i915_active_fence *active) in enable_signaling() argument
589 if (unlikely(is_barrier(active))) in enable_signaling()
592 fence = i915_active_fence_get(active); in enable_signaling()
656 static int __await_active(struct i915_active_fence *active, in __await_active() argument
662 if (is_barrier(active)) /* XXX flush the barrier? */ in __await_active()
665 fence = i915_active_fence_get(active); in __await_active()
814 * i915_active, due to overlapping active phases there is likely a in reuse_idle_barrier()
1044 * __i915_active_fence_set: Update the last active fence along its timeline
1045 * @active: the active tracker
1048 * Records the new @fence as the last active fence along its timeline in
1049 * this active tracker, moving the tracking callbacks from the previous
1056 __i915_active_fence_set(struct i915_active_fence *active, in __i915_active_fence_set() argument
1062 if (fence == rcu_access_pointer(active->fence)) in __i915_active_fence_set()
1069 * C already resident as the active->fence. in __i915_active_fence_set()
1088 prev = xchg(__active_fence_slot(active), fence); in __i915_active_fence_set()
1092 __list_del_entry(&active->cb.node); in __i915_active_fence_set()
1095 list_add_tail(&active->cb.node, &fence->cb_list); in __i915_active_fence_set()
1101 int i915_active_fence_set(struct i915_active_fence *active, in i915_active_fence_set() argument
1107 /* Must maintain timeline ordering wrt previous active requests */ in i915_active_fence_set()
1109 fence = __i915_active_fence_set(active, &rq->fence); in i915_active_fence_set()