diff options
author | Dave Airlie | 2022-09-02 05:34:33 +1000 |
---|---|---|
committer | Dave Airlie | 2022-09-02 05:55:51 +1000 |
commit | a71f3950c803cb18080746aaa8b66af122f32841 (patch) | |
tree | 996d8fc772ec19545f3aaa127113c6944994abe3 /drivers | |
parent | a54569b1f9721be11ca5b2c8a8bb3c652ebf576c (diff) | |
parent | a3f7c10a269d5b77dd5822ade822643ced3057f0 (diff) |
Merge tag 'drm-misc-fixes-2022-08-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
Short summary of fixes pull:
* dma-buf/dma-resv: Fence-handling fix
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/Yw+pZnEbPxkJ1nHa@linux-uq9g.fritz.box
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma-buf/dma-resv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index 205acb2c744d..e3885c90a3ac 100644 --- a/drivers/dma-buf/dma-resv.c +++ b/drivers/dma-buf/dma-resv.c @@ -295,7 +295,8 @@ void dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage old_usage; dma_resv_list_entry(fobj, i, obj, &old, &old_usage); - if ((old->context == fence->context && old_usage >= usage) || + if ((old->context == fence->context && old_usage >= usage && + dma_fence_is_later(fence, old)) || dma_fence_is_signaled(old)) { dma_resv_list_set(fobj, i, fence, usage); dma_fence_put(old); |