aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma-buf/dma-resv.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-11-03 13:35:14 +0100
committerChristian König <christian.koenig@amd.com>2022-04-05 09:53:50 +0200
commit71d637823cac7748079a912e0373476c7cf6f985 (patch)
treeac4f51f9170b998e4ed50f69376ee4306bd74850 /drivers/dma-buf/dma-resv.c
parentdrm/nouveau: stop using dma_resv_excl_fence (diff)
downloadlinux-dev-71d637823cac7748079a912e0373476c7cf6f985.tar.xz
linux-dev-71d637823cac7748079a912e0373476c7cf6f985.zip
dma-buf: finally make dma_resv_excl_fence private v2
Drivers should never touch this directly. v2: fix rebase clash Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220321135856.1331-10-christian.koenig@amd.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/dma-buf/dma-resv.c')
-rw-r--r--drivers/dma-buf/dma-resv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
index ff16da0a54ec..15ffac35439d 100644
--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -140,6 +140,12 @@ void dma_resv_fini(struct dma_resv *obj)
}
EXPORT_SYMBOL(dma_resv_fini);
+static inline struct dma_fence *
+dma_resv_excl_fence(struct dma_resv *obj)
+{
+ return rcu_dereference_check(obj->fence_excl, dma_resv_held(obj));
+}
+
static inline struct dma_resv_list *dma_resv_shared_list(struct dma_resv *obj)
{
return rcu_dereference_check(obj->fence, dma_resv_held(obj));