From: Gustavo Padovan Date: Mon, 7 Nov 2016 10:03:31 +0000 (+0900) Subject: drm/imx: use drm_atomic_set_fence_for_plane() to set the fence X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aee2586490e9c1ff73bdc4fbf705469a6fa4e074;p=linux-beck.git drm/imx: use drm_atomic_set_fence_for_plane() to set the fence drm_atomic_set_fence_for_plane() is smart and won't overwrite plane_state->fence if the user already set an explicit fence there. Cc: Philipp Zabel Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Acked-by: Philipp Zabel Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-2-git-send-email-gustavo@padovan.org --- diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 98df09c2b388..07fe9556c7aa 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -158,6 +158,7 @@ static int imx_drm_atomic_commit(struct drm_device *dev, struct drm_plane_state *plane_state; struct drm_plane *plane; struct dma_buf *dma_buf; + struct dma_fence *fence; int i; /* @@ -170,8 +171,9 @@ static int imx_drm_atomic_commit(struct drm_device *dev, 0)->base.dma_buf; if (!dma_buf) continue; - plane_state->fence = - reservation_object_get_excl_rcu(dma_buf->resv); + fence = reservation_object_get_excl_rcu(dma_buf->resv); + + drm_atomic_set_fence_for_plane(plane_state, fence); } }