diff options
author | Christian König <ckoenig.leichtzumerken@gmail.com> | 2024-08-26 14:25:39 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2024-09-06 18:05:58 +0200 |
commit | a401bd1264b400f96a4cf61ed3fc144008e97a4e (patch) | |
tree | 85ae8d6c52cacb2268a027a907db10f2f871f794 | |
parent | b2ef808786d93df36585cee42cfb973fc41636eb (diff) | |
download | lwn-a401bd1264b400f96a4cf61ed3fc144008e97a4e.tar.gz lwn-a401bd1264b400f96a4cf61ed3fc144008e97a4e.zip |
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: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240826122541.85663-2-christian.koenig@amd.com
-rw-r--r-- | include/linux/dma-fence.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index e06bad467f55..e7ad819962e3 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h @@ -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) |