summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2024-08-26 10:01:43 -0700
committerMatthew Brost <matthew.brost@intel.com>2024-08-30 11:41:05 -0700
commitddc94d0b17e8ea8179ecbbefacac3fba0fb77265 (patch)
tree97275ea12a0fe1e9d8fd30618e2bd903c164a030 /include
parent20f61c1ead989e5d16f35bd0a546c6233b703b69 (diff)
dma-buf: Split out dma fence array create into alloc and arm functions
Useful to preallocate dma fence array and then arm in path of reclaim or a dma fence. v2: - s/arm/init (Christian) - Drop !array warn (Christian) v3: - Fix kernel doc typos (dim) Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240826170144.2492062-2-matthew.brost@intel.com
Diffstat (limited to 'include')
-rw-r--r--include/linux/dma-fence-array.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dma-fence-array.h b/include/linux/dma-fence-array.h
index 29c5650c1038..079b3dec0a16 100644
--- a/include/linux/dma-fence-array.h
+++ b/include/linux/dma-fence-array.h
@@ -79,6 +79,12 @@ to_dma_fence_array(struct dma_fence *fence)
for (index = 0, fence = dma_fence_array_first(head); fence; \
++(index), fence = dma_fence_array_next(head, index))
+struct dma_fence_array *dma_fence_array_alloc(int num_fences);
+void dma_fence_array_init(struct dma_fence_array *array,
+ int num_fences, struct dma_fence **fences,
+ u64 context, unsigned seqno,
+ bool signal_on_any);
+
struct dma_fence_array *dma_fence_array_create(int num_fences,
struct dma_fence **fences,
u64 context, unsigned seqno,