summaryrefslogtreecommitdiff
path: root/include/linux/dma-fence-chain.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2022-03-11 12:27:53 +0300
committerChristian König <christian.koenig@amd.com>2022-03-25 16:18:28 +0300
commit64a8f92fd783e750cdb81af75942dcd53bbf61bd (patch)
treecbddd8445aae570b7a0cca7fd66c4c9245fcdd34 /include/linux/dma-fence-chain.h
parentcaaf2ae712b7cc3c7717898fe267dbf882a502ef (diff)
downloadlinux-64a8f92fd783e750cdb81af75942dcd53bbf61bd.tar.xz
dma-buf: add dma_fence_unwrap v2
Add a general purpose helper to deep dive into dma_fence_chain/dma_fence_array structures and iterate over all the fences in them. This is useful when we need to flatten out all fences in those structures. v2: some selftests cleanup, improved function naming and documentation Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20220311110244.1245-1-christian.koenig@amd.com
Diffstat (limited to 'include/linux/dma-fence-chain.h')
-rw-r--r--include/linux/dma-fence-chain.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dma-fence-chain.h b/include/linux/dma-fence-chain.h
index 10d51bcdf7b7..4bdf0b96da28 100644
--- a/include/linux/dma-fence-chain.h
+++ b/include/linux/dma-fence-chain.h
@@ -112,6 +112,8 @@ static inline void dma_fence_chain_free(struct dma_fence_chain *chain)
*
* Iterate over all fences in the chain. We keep a reference to the current
* fence while inside the loop which must be dropped when breaking out.
+ *
+ * For a deep dive iterator see dma_fence_unwrap_for_each().
*/
#define dma_fence_chain_for_each(iter, head) \
for (iter = dma_fence_get(head); iter; \