Lines Matching refs:fence
71 struct dma_resv *resv, struct dma_fence **fence, in dma_resv_list_entry() argument
78 *fence = (struct dma_fence *)(tmp & ~DMA_RESV_LIST_MASK); in dma_resv_list_entry()
86 struct dma_fence *fence, in dma_resv_list_set() argument
89 long tmp = ((long)fence) | usage; in dma_resv_list_set()
126 struct dma_fence *fence; in dma_resv_list_free() local
128 dma_resv_list_entry(list, i, NULL, &fence, NULL); in dma_resv_list_free()
129 dma_fence_put(fence); in dma_resv_list_free()
217 struct dma_fence *fence; in dma_resv_reserve_fences() local
219 dma_resv_list_entry(old, i, obj, &fence, &usage); in dma_resv_reserve_fences()
220 if (dma_fence_is_signaled(fence)) in dma_resv_reserve_fences()
221 RCU_INIT_POINTER(new->table[--k], fence); in dma_resv_reserve_fences()
223 dma_resv_list_set(new, j++, fence, usage); in dma_resv_reserve_fences()
242 struct dma_fence *fence; in dma_resv_reserve_fences() local
244 fence = rcu_dereference_protected(new->table[i], in dma_resv_reserve_fences()
246 dma_fence_put(fence); in dma_resv_reserve_fences()
287 void dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence, in dma_resv_add_fence() argument
294 dma_fence_get(fence); in dma_resv_add_fence()
301 WARN_ON(dma_fence_is_container(fence)); in dma_resv_add_fence()
310 if ((old->context == fence->context && old_usage >= usage && in dma_resv_add_fence()
311 dma_fence_is_later_or_same(fence, old)) || in dma_resv_add_fence()
313 dma_resv_list_set(fobj, i, fence, usage); in dma_resv_add_fence()
322 dma_resv_list_set(fobj, i, fence, usage); in dma_resv_add_fence()
384 dma_fence_put(cursor->fence); in dma_resv_iter_walk_unlocked()
387 cursor->fence = NULL; in dma_resv_iter_walk_unlocked()
393 cursor->obj, &cursor->fence, in dma_resv_iter_walk_unlocked()
395 cursor->fence = dma_fence_get_rcu(cursor->fence); in dma_resv_iter_walk_unlocked()
396 if (!cursor->fence) { in dma_resv_iter_walk_unlocked()
401 if (!dma_fence_is_signaled(cursor->fence) && in dma_resv_iter_walk_unlocked()
428 return cursor->fence; in dma_resv_iter_first_unlocked()
457 return cursor->fence; in dma_resv_iter_next_unlocked()
472 struct dma_fence *fence; in dma_resv_iter_first() local
479 fence = dma_resv_iter_next(cursor); in dma_resv_iter_first()
481 return fence; in dma_resv_iter_first()
494 struct dma_fence *fence; in dma_resv_iter_next() local
506 cursor->obj, &fence, &cursor->fence_usage); in dma_resv_iter_next()
509 return fence; in dma_resv_iter_next()
572 struct dma_fence *fence; in dma_resv_get_fences() local
578 dma_resv_for_each_fence_unlocked(&cursor, fence) { in dma_resv_get_fences()
603 (*fences)[(*num_fences)++] = dma_fence_get(fence); in dma_resv_get_fences()
627 struct dma_fence **fence) in dma_resv_get_singleton() argument
639 *fence = NULL; in dma_resv_get_singleton()
644 *fence = fences[0]; in dma_resv_get_singleton()
659 *fence = &array->base; in dma_resv_get_singleton()
682 struct dma_fence *fence; in dma_resv_wait_timeout() local
685 dma_resv_for_each_fence_unlocked(&cursor, fence) { in dma_resv_wait_timeout()
687 ret = dma_fence_wait_timeout(fence, intr, ret); in dma_resv_wait_timeout()
712 struct dma_fence *fence; in dma_resv_set_deadline() local
715 dma_resv_for_each_fence_unlocked(&cursor, fence) { in dma_resv_set_deadline()
716 dma_fence_set_deadline(fence, deadline); in dma_resv_set_deadline()
738 struct dma_fence *fence; in dma_resv_test_signaled() local
741 dma_resv_for_each_fence_unlocked(&cursor, fence) { in dma_resv_test_signaled()
762 struct dma_fence *fence; in dma_resv_describe() local
764 dma_resv_for_each_fence(&cursor, obj, DMA_RESV_USAGE_READ, fence) { in dma_resv_describe()
767 dma_fence_describe(fence, seq); in dma_resv_describe()