summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/armada/armada_overlay.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-07-08 12:22:34 +0300
committerRussell King <rmk+kernel@armlinux.org.uk>2017-12-08 15:21:57 +0300
commit07da3c787a273b6d8478b416a694a740c85bdf72 (patch)
tree6aa09b995481e25c615a08c8c825fc432ade681d /drivers/gpu/drm/armada/armada_overlay.c
parent65843e9af759eb0d1a0f0ee6dc64b3162793132c (diff)
downloadlinux-07da3c787a273b6d8478b416a694a740c85bdf72.tar.xz
drm/armada: wait for previous work when moving overlay window
We must wait for the previous plane work to complete before moving the overlay window, as it could overwrite our positioning update. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_overlay.c')
-rw-r--r--drivers/gpu/drm/armada/armada_overlay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index e5fa346f572b..853f889e84f5 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -239,16 +239,16 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
if (!dplane->base.state.changed)
return 0;
+ /* Wait for pending work to complete */
+ if (armada_drm_plane_work_wait(&dplane->base, HZ / 25) == 0)
+ armada_drm_plane_work_cancel(dcrtc, &dplane->base);
+
/* Just updating the position/size? */
if (!dplane->base.state.vsync_update) {
armada_ovl_plane_work(dcrtc, work);
return 0;
}
- /* Wait for pending work to complete */
- if (armada_drm_plane_work_wait(&dplane->base, HZ / 25) == 0)
- armada_drm_plane_work_cancel(dcrtc, &dplane->base);
-
if (!dcrtc->plane) {
dcrtc->plane = plane;
armada_ovl_update_attr(&dplane->prop, dcrtc);