Commit c99907c7 authored by Christian König's avatar Christian König

dma-buf: make fence mandatory for dma_resv_add_excl_fence v2

Calling dma_resv_add_excl_fence() with the fence as NULL and expecting
that that this frees up the fences is simply abuse of the internals of
the dma_resv object.

v2: drop the fence pruning completely.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20211129120659.1815-4-christian.koenig@amd.com
parent f8be2c59
...@@ -305,8 +305,7 @@ void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence) ...@@ -305,8 +305,7 @@ void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence)
if (old) if (old)
i = old->shared_count; i = old->shared_count;
if (fence) dma_fence_get(fence);
dma_fence_get(fence);
write_seqcount_begin(&obj->seq); write_seqcount_begin(&obj->seq);
/* write_seqcount_begin provides the necessary memory barrier */ /* write_seqcount_begin provides the necessary memory barrier */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment