Lines Matching +full:compute +full:- +full:cb

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Fence mechanism for dma-buf to allow for asynchronous dma access
30 * struct dma_fence - software synchronization primitive
49 * DMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled
50 * DMA_FENCE_FLAG_TIMESTAMP_BIT - timestamp recorded for fence signaling
51 * DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT - enable_signaling might have been called
52 * DMA_FENCE_FLAG_USER_BITS - start of the unused bits, can be used by the
106 struct dma_fence_cb *cb);
109 * struct dma_fence_cb - callback for dma_fence_add_callback()
122 * struct dma_fence_ops - operations implemented for fence
138 * compute the name at runtime, without having it to store permanently
149 * callback to allow drivers to compute the name at runtime, without
162 * For fence implementations that have the capability for hw->hw
165 * costly operations for the common case where only hw->hw
169 * signal (ie. hw->sw case).
221 * Must return -ERESTARTSYS if the wait is intr = true and the wait was
243 * Callback to fill in free-form debug info specific to this fence, like
270 * dma_fence_put - decreases refcount of the fence
276 kref_put(&fence->refcount, dma_fence_release); in dma_fence_put()
280 * dma_fence_get - increases refcount of the fence
288 kref_get(&fence->refcount); in dma_fence_get()
293 * dma_fence_get_rcu - get a fence from a dma_resv_list with
301 if (kref_get_unless_zero(&fence->refcount)) in dma_fence_get_rcu()
308 * dma_fence_get_rcu_safe - acquire a reference to an RCU tracked fence
378 struct dma_fence_cb *cb,
381 struct dma_fence_cb *cb);
385 * dma_fence_is_signaled_locked - Return an indication if the fence
401 if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) in dma_fence_is_signaled_locked()
404 if (fence->ops->signaled && fence->ops->signaled(fence)) { in dma_fence_is_signaled_locked()
413 * dma_fence_is_signaled - Return an indication if the fence is signaled yet.
424 * value of this function before calling hardware-specific wait instructions.
431 if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) in dma_fence_is_signaled()
434 if (fence->ops->signaled && fence->ops->signaled(fence)) { in dma_fence_is_signaled()
443 * __dma_fence_is_later - return if f1 is chronologically later than f2
458 if (ops->use_64bit_seqno) in __dma_fence_is_later()
461 return (int)(lower_32_bits(f1) - lower_32_bits(f2)) > 0; in __dma_fence_is_later()
465 * dma_fence_is_later - return if f1 is chronologically later than f2
470 * from the same context, since a seqno is not re-used across contexts.
475 if (WARN_ON(f1->context != f2->context)) in dma_fence_is_later()
478 return __dma_fence_is_later(f1->seqno, f2->seqno, f1->ops); in dma_fence_is_later()
482 * dma_fence_later - return the chronologically later fence
488 * not re-used across contexts.
493 if (WARN_ON(f1->context != f2->context)) in dma_fence_later()
508 * dma_fence_get_status_locked - returns the status upon completion
524 return fence->error ?: 1; in dma_fence_get_status_locked()
532 * dma_fence_set_error - flag an error condition on the fence
545 WARN_ON(test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)); in dma_fence_set_error()
546 WARN_ON(error >= 0 || error < -MAX_ERRNO); in dma_fence_set_error()
548 fence->error = error; in dma_fence_set_error()
559 * dma_fence_wait - sleep until the fence gets signaled
563 * This function will return -ERESTARTSYS if interrupted by a signal,
579 * -ERESTARTSYS and MAX_SCHEDULE_TIMEOUT. in dma_fence_wait()
594 * dma_fence_is_array - check if a fence is from the array subclass
601 return fence->ops == &dma_fence_array_ops; in dma_fence_is_array()
605 * dma_fence_is_chain - check if a fence is from the chain subclass
612 return fence->ops == &dma_fence_chain_ops; in dma_fence_is_chain()
616 * dma_fence_is_container - check if a fence is a container for other fences