]> git.baikalelectronics.ru Git - kernel.git/commit
dma-buf: generalize dma_fence unwrap & merging v3
authorChristian König <christian.koenig@amd.com>
Mon, 25 Apr 2022 12:22:12 +0000 (14:22 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 30 May 2022 12:24:04 +0000 (14:24 +0200)
commit67d1293893d32be8f8ea4710043e692f26e9631b
treed9da42cead12ac1cfc5583fd14751d99c4b39140
parentcea5e054cbd133e95e6c85777cbd29d356210b8a
dma-buf: generalize dma_fence unwrap & merging v3

Introduce a dma_fence_unwrap_merge() macro which allows to unwrap fences
which potentially can be containers as well and then merge them back
together into a flat dma_fence_array.

v2: rename the function, add some more comments about how the wrapper is
    used, move filtering of signaled fences into the unwrap iterator,
    add complex selftest which covers more cases.
v3: fix signaled fence filtering once more

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/20220518135844.3338-5-christian.koenig@amd.com
drivers/dma-buf/dma-fence-unwrap.c
drivers/dma-buf/st-dma-fence-unwrap.c
drivers/dma-buf/sync_file.c
include/linux/dma-fence-unwrap.h