dma-buf: add dma_fence_unwrap v2
authorChristian König <christian.koenig@amd.com>
Fri, 11 Mar 2022 09:27:53 +0000 (10:27 +0100)
committerChristian König <christian.koenig@amd.com>
Fri, 25 Mar 2022 13:18:28 +0000 (14:18 +0100)
commit64a8f92fd783e750cdb81af75942dcd53bbf61bd
treecbddd8445aae570b7a0cca7fd66c4c9245fcdd34
parentcaaf2ae712b7cc3c7717898fe267dbf882a502ef
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
Documentation/driver-api/dma-buf.rst
drivers/dma-buf/Makefile
drivers/dma-buf/selftests.h
drivers/dma-buf/st-dma-fence-unwrap.c [new file with mode: 0644]
include/linux/dma-fence-array.h
include/linux/dma-fence-chain.h
include/linux/dma-fence-unwrap.h [new file with mode: 0644]