• Home
  • Raw
  • Download

Lines Matching refs:active

24 static void __live_get(struct live_active *active)  in __live_get()  argument
26 kref_get(&active->ref); in __live_get()
29 static void __live_free(struct live_active *active) in __live_free() argument
31 i915_active_fini(&active->base); in __live_free()
32 kfree(active); in __live_free()
37 struct live_active *active = container_of(ref, typeof(*active), ref); in __live_release() local
39 __live_free(active); in __live_release()
42 static void __live_put(struct live_active *active) in __live_put() argument
44 kref_put(&active->ref, __live_release); in __live_put()
49 struct live_active *active = container_of(base, typeof(*active), base); in __live_active() local
51 __live_get(active); in __live_active()
57 struct live_active *active = container_of(base, typeof(*active), base); in __live_retire() local
59 active->retired = true; in __live_retire()
60 __live_put(active); in __live_retire()
65 struct live_active *active; in __live_alloc() local
67 active = kzalloc(sizeof(*active), GFP_KERNEL); in __live_alloc()
68 if (!active) in __live_alloc()
71 kref_init(&active->ref); in __live_alloc()
72 i915_active_init(&active->base, __live_active, __live_retire, 0); in __live_alloc()
74 return active; in __live_alloc()
82 struct live_active *active; in __live_active_setup() local
86 active = __live_alloc(i915); in __live_active_setup()
87 if (!active) in __live_active_setup()
92 kfree(active); in __live_active_setup()
96 err = i915_active_acquire(&active->base); in __live_active_setup()
113 err = i915_active_add_request(&active->base, rq); in __live_active_setup()
123 i915_active_release(&active->base); in __live_active_setup()
124 if (READ_ONCE(active->retired) && count) { in __live_active_setup()
128 if (atomic_read(&active->base.count) != count) { in __live_active_setup()
130 atomic_read(&active->base.count), count); in __live_active_setup()
138 __live_put(active); in __live_active_setup()
139 active = ERR_PTR(err); in __live_active_setup()
142 return active; in __live_active_setup()
148 struct live_active *active; in live_active_wait() local
153 active = __live_active_setup(i915); in live_active_wait()
154 if (IS_ERR(active)) in live_active_wait()
155 return PTR_ERR(active); in live_active_wait()
157 __i915_active_wait(&active->base, TASK_UNINTERRUPTIBLE); in live_active_wait()
158 if (!READ_ONCE(active->retired)) { in live_active_wait()
162 i915_active_print(&active->base, &p); in live_active_wait()
167 __live_put(active); in live_active_wait()
178 struct live_active *active; in live_active_retire() local
183 active = __live_active_setup(i915); in live_active_retire()
184 if (IS_ERR(active)) in live_active_retire()
185 return PTR_ERR(active); in live_active_retire()
191 if (!READ_ONCE(active->retired)) { in live_active_retire()
195 i915_active_print(&active->base, &p); in live_active_retire()
200 __live_put(active); in live_active_retire()
209 struct live_active *active; in live_active_barrier() local
214 active = __live_alloc(i915); in live_active_barrier()
215 if (!active) in live_active_barrier()
218 err = i915_active_acquire(&active->base); in live_active_barrier()
223 err = i915_active_acquire_preallocate_barrier(&active->base, in live_active_barrier()
228 i915_active_acquire_barrier(&active->base); in live_active_barrier()
231 i915_active_release(&active->base); in live_active_barrier()
235 __i915_active_wait(&active->base, TASK_UNINTERRUPTIBLE); in live_active_barrier()
236 if (!READ_ONCE(active->retired)) { in live_active_barrier()
242 __live_put(active); in live_active_barrier()
281 drm_printf(m, "active %ps:%ps\n", ref->active, ref->retire); in i915_active_print()
316 struct i915_active_fence *active) in active_flush() argument
320 fence = xchg(__active_fence_slot(active), NULL); in active_flush()
325 __list_del_entry(&active->cb.node); in active_flush()