提交 02edfd9c 编写于 作者: B Boris Brezillon

drm/atomic: Add sanity checks to drm_atomic_helper_async_commit()

->atomic_async_update() requires that drivers update the plane->state
object before returning. Make sure at least common properties have been
updated.

Cc: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
Acked-by: NEric Anholt <eric@anholt.net>
Acked-by: NSean Paul <seanpaul@chromium.org>
Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180330145518.29770-1-boris.brezillon@bootlin.com
上级 539c320b
...@@ -1572,6 +1572,17 @@ void drm_atomic_helper_async_commit(struct drm_device *dev, ...@@ -1572,6 +1572,17 @@ void drm_atomic_helper_async_commit(struct drm_device *dev,
for_each_new_plane_in_state(state, plane, plane_state, i) { for_each_new_plane_in_state(state, plane, plane_state, i) {
funcs = plane->helper_private; funcs = plane->helper_private;
funcs->atomic_async_update(plane, plane_state); funcs->atomic_async_update(plane, plane_state);
/*
* ->atomic_async_update() is supposed to update the
* plane->state in-place, make sure at least common
* properties have been properly updated.
*/
WARN_ON_ONCE(plane->state->fb != plane_state->fb);
WARN_ON_ONCE(plane->state->crtc_x != plane_state->crtc_x);
WARN_ON_ONCE(plane->state->crtc_y != plane_state->crtc_y);
WARN_ON_ONCE(plane->state->src_x != plane_state->src_x);
WARN_ON_ONCE(plane->state->src_y != plane_state->src_y);
} }
} }
EXPORT_SYMBOL(drm_atomic_helper_async_commit); EXPORT_SYMBOL(drm_atomic_helper_async_commit);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册