summaryrefslogtreecommitdiff
path: root/include/linux/dma-fence.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dma-fence.h')
-rw-r--r--include/linux/dma-fence.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
index 02dba8cd033d..eb9b05aa5aea 100644
--- a/include/linux/dma-fence.h
+++ b/include/linux/dma-fence.h
@@ -166,8 +166,7 @@ struct dma_fence_ops {
* released when the fence is signalled (through e.g. the interrupt
* handler).
*
- * This callback is optional. If this callback is not present, then the
- * driver must always have signaling enabled.
+ * This callback is mandatory.
*/
bool (*enable_signaling)(struct dma_fence *fence);
@@ -191,14 +190,11 @@ struct dma_fence_ops {
/**
* @wait:
*
- * Custom wait implementation, defaults to dma_fence_default_wait() if
- * not set.
+ * Custom wait implementation, or dma_fence_default_wait.
*
- * The dma_fence_default_wait implementation should work for any fence, as long
- * as @enable_signaling works correctly. This hook allows drivers to
- * have an optimized version for the case where a process context is
- * already available, e.g. if @enable_signaling for the general case
- * needs to set up a worker thread.
+ * Must not be NULL, set to dma_fence_default_wait for default implementation.
+ * the dma_fence_default_wait implementation should work for any fence, as long
+ * as enable_signaling works correctly.
*
* Must return -ERESTARTSYS if the wait is intr = true and the wait was
* interrupted, and remaining jiffies if fence has signaled, or 0 if wait
@@ -206,7 +202,7 @@ struct dma_fence_ops {
* which should be treated as if the fence is signaled. For example a hardware
* lockup could be reported like that.
*
- * This callback is optional.
+ * This callback is mandatory.
*/
signed long (*wait)(struct dma_fence *fence,
bool intr, signed long timeout);
@@ -222,6 +218,17 @@ struct dma_fence_ops {
void (*release)(struct dma_fence *fence);
/**
+ * @fill_driver_data:
+ *
+ * Callback to fill in free-form debug info.
+ *
+ * Returns amount of bytes filled, or negative error on failure.
+ *
+ * This callback is optional.
+ */
+ int (*fill_driver_data)(struct dma_fence *fence, void *data, int size);
+
+ /**
* @fence_value_str:
*
* Callback to fill in free-form debug info specific to this fence, like
@@ -235,9 +242,8 @@ struct dma_fence_ops {
* @timeline_value_str:
*
* Fills in the current value of the timeline as a string, like the
- * sequence number. Note that the specific fence passed to this function
- * should not matter, drivers should only use it to look up the
- * corresponding timeline structures.
+ * sequence number. This should match what @fill_driver_data prints for
+ * the most recently signalled fence (assuming no delayed signalling).
*/
void (*timeline_value_str)(struct dma_fence *fence,
char *str, int size);