Lines Matching refs:prev
23 struct dma_fence *prev; in dma_fence_chain_get_prev() local
26 prev = dma_fence_get_rcu_safe(&chain->prev); in dma_fence_chain_get_prev()
28 return prev; in dma_fence_chain_get_prev()
42 struct dma_fence *prev, *replacement, *tmp; in dma_fence_chain_walk() local
50 while ((prev = dma_fence_chain_get_prev(chain))) { in dma_fence_chain_walk()
52 prev_chain = to_dma_fence_chain(prev); in dma_fence_chain_walk()
59 if (!dma_fence_is_signaled(prev)) in dma_fence_chain_walk()
65 tmp = unrcu_pointer(cmpxchg(&chain->prev, RCU_INITIALIZER(prev), in dma_fence_chain_walk()
67 if (tmp == prev) in dma_fence_chain_walk()
71 dma_fence_put(prev); in dma_fence_chain_walk()
75 return prev; in dma_fence_chain_walk()
181 struct dma_fence *prev; in dma_fence_chain_release() local
186 while ((prev = rcu_dereference_protected(chain->prev, true))) { in dma_fence_chain_release()
189 if (kref_read(&prev->refcount) > 1) in dma_fence_chain_release()
192 prev_chain = to_dma_fence_chain(prev); in dma_fence_chain_release()
199 chain->prev = prev_chain->prev; in dma_fence_chain_release()
200 RCU_INIT_POINTER(prev_chain->prev, NULL); in dma_fence_chain_release()
201 dma_fence_put(prev); in dma_fence_chain_release()
203 dma_fence_put(prev); in dma_fence_chain_release()
230 struct dma_fence *prev, in dma_fence_chain_init() argument
234 struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev); in dma_fence_chain_init()
238 rcu_assign_pointer(chain->prev, prev); in dma_fence_chain_init()
243 if (prev_chain && __dma_fence_is_later(seqno, prev->seqno, prev->ops)) { in dma_fence_chain_init()
244 context = prev->context; in dma_fence_chain_init()
245 chain->prev_seqno = prev->seqno; in dma_fence_chain_init()
250 seqno = max(prev->seqno, seqno); in dma_fence_chain_init()