Lines Matching defs:fence

57  * @fence:	fence to add to the sync_fence
59 * Creates a sync_file containg @fence. This function acquires and additional
60 * reference of @fence for the newly-created &sync_file, if it succeeds. The
64 struct sync_file *sync_file_create(struct dma_fence *fence)
72 sync_file->fence = dma_fence_get(fence);
96 * sync_file_get_fence - get the fence related to the sync_file fd
97 * @fd: sync_file fd to get the fence from
99 * Ensures @fd references a valid sync_file and returns a fence that
100 * represents all fence in the sync_file. On error NULL is returned.
105 struct dma_fence *fence;
111 fence = dma_fence_get(sync_file->fence);
114 return fence;
120 * @sync_file: sync_file to get the fence from
125 * sync_files together) or created from the fence it contains. In the latter
136 struct dma_fence *fence = sync_file->fence;
139 fence->ops->get_driver_name(fence),
140 fence->ops->get_timeline_name(fence),
141 fence->context,
142 fence->seqno);
156 * we already own a new reference to the fence. For num_fence > 1
160 sync_file->fence = fences[0];
169 sync_file->fence = &array->base;
178 if (dma_fence_is_array(sync_file->fence)) {
179 struct dma_fence_array *array = to_dma_fence_array(sync_file->fence);
186 return &sync_file->fence;
190 int *i, struct dma_fence *fence)
192 fences[*i] = fence;
194 if (!dma_fence_is_signaled(fence)) {
195 dma_fence_get(fence);
202 * @name: name of new fence
301 dma_fence_remove_callback(sync_file->fence, &sync_file->cb);
302 dma_fence_put(sync_file->fence);
316 if (dma_fence_add_callback(sync_file->fence, &sync_file->cb,
321 return dma_fence_is_signaled(sync_file->fence) ? EPOLLIN : 0;
358 data.fence = fd;
379 static int sync_fill_fence_info(struct dma_fence *fence,
382 strlcpy(info->obj_name, fence->ops->get_timeline_name(fence),
384 strlcpy(info->driver_name, fence->ops->get_driver_name(fence),
387 info->status = dma_fence_get_status(fence);
388 while (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) &&
389 !test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags))
392 test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags) ?
393 ktime_to_ns(fence->timestamp) :
423 info.status = dma_fence_get_status(sync_file->fence);