diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2016-11-07 19:03:31 +0900 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-11-08 11:27:14 +0100 |
commit | aee2586490e9c1ff73bdc4fbf705469a6fa4e074 (patch) | |
tree | a6507b882b0682c52b46856bd5ec48272f4148ed /drivers/gpu/drm/imx | |
parent | 13b55664eec7b85607c4ab9d26a62b4af413a771 (diff) | |
download | op-kernel-dev-aee2586490e9c1ff73bdc4fbf705469a6fa4e074.zip op-kernel-dev-aee2586490e9c1ff73bdc4fbf705469a6fa4e074.tar.gz |
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 <p.zabel@pengutronix.de>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-2-git-send-email-gustavo@padovan.org
Diffstat (limited to 'drivers/gpu/drm/imx')
-rw-r--r-- | drivers/gpu/drm/imx/imx-drm-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 98df09c..07fe955 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); } } |