Commit a401bd12 authored by Christian König's avatar Christian König Committed by Christian König
Browse files

dma-buf: give examples of error codes to use



The dma_fence_set_error() function allows to set an error code on a
dma_fence object before it is signaled.

Document some of the potential error codes drivers should use and
especially what they mean.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240826122541.85663-2-christian.koenig@amd.com
parent b2ef8087
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -574,6 +574,12 @@ int dma_fence_get_status(struct dma_fence *fence);
 * rather than success. This must be set before signaling (so that the value
 * is visible before any waiters on the signal callback are woken). This
 * helper exists to help catching erroneous setting of #dma_fence.error.
 *
 * Examples of error codes which drivers should use:
 *
 * * %-ENODATA	 This operation produced no data, no other operation affected.
 * * %-ECANCELED All operations from the same context have been canceled.
 * * %-ETIME	 Operation caused a timeout and potentially device reset.
 */
static inline void dma_fence_set_error(struct dma_fence *fence,
				       int error)