Home | History | Annotate | Download | only in linux

Lines Matching defs:shared

51 	list = kmem_alloc(offsetof(typeof(*list), shared[n]), KM_NOSLEEP);
64 list = kmem_alloc(offsetof(typeof(*list), shared[n]), KM_SLEEP);
75 kmem_free(list, offsetof(typeof(*list), shared[n]));
128 dma_fence_put(robj->fence->shared[i]);
129 robj->fence->shared[i] = NULL; /* paranoia */
300 * Return a pointer to the shared fence list of the reservation
316 * Reserve space in robj to add num_fences shared fences. To be
462 * and length of the shared fence list of robj and return true, or
468 * shared list at the moment. Does not take any fence references.
533 * have previously loaded the shared fence list and should
560 * Empty and release all of robj's shared fences, and clear and
584 /* If there are any shared fences, remember how many. */
591 /* Replace the fence and zero the shared count. */
605 /* Release any old shared fences. */
608 dma_fence_put(old_list->shared[old_shared_count]);
610 old_list->shared[old_shared_count] = NULL;
618 * Acquire a reference to fence and add it to robj's shared list.
623 * call to dma_resv_reserve_shared for each shared fence
656 shared[i]->context == fence->context) {
657 replace = list->shared[i];
658 atomic_store_relaxed(&list->shared[i], fence);
665 atomic_store_relaxed(&list->shared[list->shared_count],
690 list->shared[i]->context == fence->context) {
691 replace = list->shared[i];
692 prealloc->shared[i] = fence;
694 prealloc->shared[i] = list->shared[i];
702 prealloc->shared[prealloc->shared_count++] = fence;
754 * Get a snapshot of the exclusive and shared fences of robj. The
755 * shared fences are returned as a pointer *sharedp to an array,
770 struct dma_fence **shared = NULL;
780 /* If there is a shared list, grab it. */
797 if (shared == NULL) {
803 shared = kcalloc(shared_alloc, sizeof(shared[0]),
805 if (shared == NULL) {
812 shared = kcalloc(shared_alloc,
813 sizeof(shared[0]), GFP_KERNEL);
814 if (shared == NULL)
826 kfree(shared);
827 shared = kcalloc(shared_alloc, sizeof(shared[0]),
829 if (shared == NULL)
842 shared[i] = atomic_load_relaxed(&list->shared[i]);
855 * Try to get a reference to all of the shared fences.
858 if (dma_fence_get_rcu(atomic_load_relaxed(&shared[i])) == NULL)
871 shared[shared_count++] = fence;
873 shared = kmalloc(sizeof(shared[0]), GFP_KERNEL);
874 shared[0] = fence;
879 *sharedp = shared;
885 dma_fence_put(shared[i]);
886 shared[i] = NULL; /* paranoia */
902 * Copy the exclusive fence and all the shared fences from src to
928 /* Get the shared list. */
951 fence = atomic_load_relaxed(&src_list->shared[i]);
959 dst_list->shared[dst_list->shared_count++] = fence;
977 * We now have a snapshot of the shared and exclusive fences of
983 /* Get the old shared and exclusive fences, if any. */
1006 /* Release any old shared fences. */
1009 dma_fence_put(old_list->shared[i]);
1010 old_list->shared[i] = NULL; /* paranoia */
1024 dma_fence_put(dst_list->shared[i]);
1025 dst_list->shared[i] = NULL; /* paranoia */
1033 * dma_resv_test_signaled_rcu(robj, shared)
1035 * If shared is true, test whether all of the shared fences are
1037 * fence is signalled. If shared is false, test only whether the
1040 * XXX Why does this _not_ test the exclusive fence if shared is
1041 * true only if there are no shared fences? This makes no sense.
1045 bool shared)
1059 /* If shared is requested and there is a shared list, test it. */
1060 if (shared) {
1077 fence = atomic_load_relaxed(&list->shared[i]);
1118 * dma_resv_wait_timeout_rcu(robj, shared, intr, timeout)
1120 * If shared is true, wait for all of the shared fences to be
1122 * to be signalled. If shared is false, wait only for the
1126 * XXX Why does this _not_ wait for the exclusive fence if shared
1127 * is true only if there are no shared fences? This makes no
1132 bool shared, bool intr, unsigned long timeout)
1141 return dma_resv_test_signaled_rcu(robj, shared);
1149 /* If shared is requested and there is a shared list, wait on it. */
1150 if (shared) {
1167 fence = atomic_load_relaxed(&list->shared[i]);
1259 * spuriously notify them about a shared fence, tough.
1279 * - POLLOUT wait for all fences shared and exclusive
1315 /* If we want to wait for all fences, get the shared list. */
1333 fence = atomic_load_relaxed(&list->shared[i]);
1345 /* If all shared fences have been signalled, move on. */
1372 fence = atomic_load_relaxed(&list->shared[i]);