From: Ville Syrjälä Date: Wed, 14 Dec 2011 22:12:09 +0000 (+0200) Subject: staging: mrst: Need to wait for overlay in set_plane_opts() X-Git-Tag: 2.1b_release~427 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fb34439437e6e1088255e61c45fd9122db6a7a9;p=kernel%2Fkernel-mfld-blackbay.git staging: mrst: Need to wait for overlay in set_plane_opts() Touching the overlay register memory while the overlay is fetching (or primed to) the data. Do an ovl_wait() to make sure no updates are pending. Signed-off-by: Ville Syrjälä Acked-by: Pauli Nieminen Reviewed-by: Jani Nikula Signed-off-by: Kirill A. Shutemov --- diff --git a/drivers/staging/mrst/drv/mdfld_overlay.c b/drivers/staging/mrst/drv/mdfld_overlay.c index 2153ee9..74a2def 100644 --- a/drivers/staging/mrst/drv/mdfld_overlay.c +++ b/drivers/staging/mrst/drv/mdfld_overlay.c @@ -1142,12 +1142,17 @@ static int mfld_overlay_set_plane_opts(struct drm_plane *plane, uint32_t flags, struct drm_plane_opts *opts) { struct mfld_overlay *ovl = to_mfld_overlay(plane); + int r; if (flags & DRM_MODE_PLANE_ZORDER) { if (opts->zorder < 0) return -EINVAL; } + r = ovl_wait(ovl); + if (r) + return r; + /* Constant alpha bits live in color key registers */ if (flags & DRM_MODE_PLANE_CONST_ALPHA) flags |= DRM_MODE_PLANE_SRC_KEY | DRM_MODE_PLANE_DST_KEY;