[PATCH 04/12] drm/gem: dd DMA-buf user fence support for the atomic helper
Christian König
ckoenig.leichtzumerken at gmail.com
Tue May 4 13:27:21 UTC 2021
Just add the call before taking locks.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
drivers/gpu/drm/drm_gem_atomic_helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/drm_gem_atomic_helper.c b/drivers/gpu/drm/drm_gem_atomic_helper.c
index a005c5a0ba46..fe0d18486643 100644
--- a/drivers/gpu/drm/drm_gem_atomic_helper.c
+++ b/drivers/gpu/drm/drm_gem_atomic_helper.c
@@ -142,11 +142,15 @@ int drm_gem_plane_helper_prepare_fb(struct drm_plane *plane, struct drm_plane_st
{
struct drm_gem_object *obj;
struct dma_fence *fence;
+ int ret;
if (!state->fb)
return 0;
obj = drm_gem_fb_get_obj(state->fb, 0);
+ ret = dma_resv_sync_user_fence(obj->resv);
+ if (ret)
+ return ret;
fence = dma_resv_get_excl_rcu(obj->resv);
drm_atomic_set_fence_for_plane(state, fence);
--
2.25.1
More information about the dri-devel
mailing list