diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-05-03 12:31:38 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-05-03 12:38:39 +0200 |
commit | 51f170a544bdb06d93316d8ff0814a52daa24a6c (patch) | |
tree | 658467e218931c8661b37373346ca76029fa4fc5 /include/linux/dma-fence.h | |
parent | bf3012ada1b2222e770de5c35c1bb16f73b3a01d (diff) | |
download | lwn-51f170a544bdb06d93316d8ff0814a52daa24a6c.tar.gz lwn-51f170a544bdb06d93316d8ff0814a52daa24a6c.zip |
Revert 190c462d5be19ba622a82f5fd0625087c870a1e6..bf3012ada1b2222e770de5c35c1bb16f73b3a01d"
I shouldn't have pushed this, CI was right - I failed to remove the
BUG_ON(!ops->wait);
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/linux/dma-fence.h')
-rw-r--r-- | include/linux/dma-fence.h | 32 |
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); |