summaryrefslogtreecommitdiff
path: root/include/linux/dma-fence-array.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-array.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-array.h')
-rw-r--r--include/linux/dma-fence-array.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dma-fence-array.h b/include/linux/dma-fence-array.h
index e34dcb0bb462..ec7f25def392 100644
--- a/include/linux/dma-fence-array.h
+++ b/include/linux/dma-fence-array.h
@@ -69,6 +69,8 @@ to_dma_fence_array(struct dma_fence *fence)
*
* Test if @array is a dma_fence_array object and if yes iterate over all fences
* in the array. If not just iterate over the fence in @array itself.
+ *
+ * For a deep dive iterator see dma_fence_unwrap_for_each().
*/
#define dma_fence_array_for_each(fence, index, head) \
for (index = 0, fence = dma_fence_array_first(head); fence; \