summaryrefslogtreecommitdiff
path: root/include/linux/dma-resv.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-11-03 12:02:08 +0300
committerChristian König <christian.koenig@amd.com>2022-04-03 18:53:28 +0300
commit92cedee6a6a3e6fcc3ffc0e3866baae5f6f76ac1 (patch)
treeec31e50f6de3b5ebaaf8c17aa9e311dad3dcbb7e /include/linux/dma-resv.h
parentd791aec9ff43df4ea0a6690eabd6c395e982ef6f (diff)
downloadlinux-92cedee6a6a3e6fcc3ffc0e3866baae5f6f76ac1.tar.xz
dma-buf: add dma_resv_get_singleton v2
Add a function to simplify getting a single fence for all the fences in the dma_resv object. v2: fix ref leak in error handling 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/20220321135856.1331-3-christian.koenig@amd.com
Diffstat (limited to 'include/linux/dma-resv.h')
-rw-r--r--include/linux/dma-resv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
index dccaf7b1663e..233ed4f14d9e 100644
--- a/include/linux/dma-resv.h
+++ b/include/linux/dma-resv.h
@@ -437,6 +437,8 @@ void dma_resv_replace_fences(struct dma_resv *obj, uint64_t context,
void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence);
int dma_resv_get_fences(struct dma_resv *obj, bool write,
unsigned int *num_fences, struct dma_fence ***fences);
+int dma_resv_get_singleton(struct dma_resv *obj, bool write,
+ struct dma_fence **fence);
int dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src);
long dma_resv_wait_timeout(struct dma_resv *obj, bool wait_all, bool intr,
unsigned long timeout);