aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-07-08 05:22:34 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2017-12-08 07:21:57 -0500
commit07da3c787a273b6d8478b416a694a740c85bdf72 (patch)
tree6aa09b995481e25c615a08c8c825fc432ade681d
parent65843e9af759eb0d1a0f0ee6dc64b3162793132c (diff)
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>
-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,
239 if (!dplane->base.state.changed) 239 if (!dplane->base.state.changed)
240 return 0; 240 return 0;
241 241
242 /* Wait for pending work to complete */
243 if (armada_drm_plane_work_wait(&dplane->base, HZ / 25) == 0)
244 armada_drm_plane_work_cancel(dcrtc, &dplane->base);
245
242 /* Just updating the position/size? */ 246 /* Just updating the position/size? */
243 if (!dplane->base.state.vsync_update) { 247 if (!dplane->base.state.vsync_update) {
244 armada_ovl_plane_work(dcrtc, work); 248 armada_ovl_plane_work(dcrtc, work);
245 return 0; 249 return 0;
246 } 250 }
247 251
248 /* Wait for pending work to complete */
249 if (armada_drm_plane_work_wait(&dplane->base, HZ / 25) == 0)
250 armada_drm_plane_work_cancel(dcrtc, &dplane->base);
251
252 if (!dcrtc->plane) { 252 if (!dcrtc->plane) {
253 dcrtc->plane = plane; 253 dcrtc->plane = plane;
254 armada_ovl_update_attr(&dplane->prop, dcrtc); 254 armada_ovl_update_attr(&dplane->prop, dcrtc);