Lines Matching refs:it
130 struct active_node *it, *n; in __active_retire() local
171 rbtree_postorder_for_each_entry_safe(it, n, &root, node) { in __active_retire()
172 GEM_BUG_ON(i915_active_fence_isset(&it->base)); in __active_retire()
173 kmem_cache_free(slab_cache, it); in __active_retire()
235 struct active_node *it; in __active_lookup() local
246 it = READ_ONCE(ref->cache); in __active_lookup()
247 if (it) { in __active_lookup()
248 u64 cached = READ_ONCE(it->timeline); in __active_lookup()
252 return it; in __active_lookup()
264 if (!cached && !cmpxchg64(&it->timeline, 0, idx)) in __active_lookup()
265 return it; in __active_lookup()
268 BUILD_BUG_ON(offsetof(typeof(*it), node)); in __active_lookup()
273 it = fetch_node(ref->tree.rb_node); in __active_lookup()
274 while (it) { in __active_lookup()
275 if (it->timeline < idx) { in __active_lookup()
276 it = fetch_node(it->node.rb_right); in __active_lookup()
277 } else if (it->timeline > idx) { in __active_lookup()
278 it = fetch_node(it->node.rb_left); in __active_lookup()
280 WRITE_ONCE(ref->cache, it); in __active_lookup()
286 return it; in __active_lookup()
483 struct active_node *it; in __active_fence() local
485 it = __active_lookup(ref, idx); in __active_fence()
486 if (unlikely(!it)) { /* Contention with parallel tree builders! */ in __active_fence()
488 it = __active_lookup(ref, idx); in __active_fence()
491 GEM_BUG_ON(!it); /* slot must be preallocated */ in __active_fence()
493 return &it->base; in __active_fence()
590 static int flush_barrier(struct active_node *it) in flush_barrier() argument
594 if (likely(!is_barrier(&it->base))) in flush_barrier()
597 engine = __barrier_to_engine(it); in flush_barrier()
599 if (!is_barrier(&it->base)) in flush_barrier()
607 struct active_node *it, *n; in flush_lazy_signals() local
611 rbtree_postorder_for_each_entry_safe(it, n, &ref->tree, node) { in flush_lazy_signals()
612 err = flush_barrier(it); /* unconnected idle barrier? */ in flush_lazy_signals()
616 enable_signaling(&it->base); in flush_lazy_signals()
730 struct active_node *it, *n; in await_active() local
732 rbtree_postorder_for_each_entry_safe(it, n, &ref->tree, node) { in await_active()
733 err = __await_active(&it->base, fn, arg); in await_active()
983 struct active_node *it; in i915_active_acquire_barrier() local
987 it = rb_entry(parent, struct active_node, node); in i915_active_acquire_barrier()
988 if (it->timeline < node->timeline) in i915_active_acquire_barrier()