From: Alexandru Gheorghe Date: Sat, 4 Aug 2018 16:15:30 +0000 (+0100) Subject: drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e81eb98e3fa8bfd558f134d9d9862eefbd5e6663;p=openwrt%2Fstaging%2Fblogic.git drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat Signed-off-by: Alexandru Gheorghe Acked-by: Sinclair Yeh Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-11-alexandru-cosmin.gheorghe@arm.com --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 4a0f0f41afa1..61824e360619 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -720,9 +720,7 @@ void vmw_du_plane_reset(struct drm_plane *plane) return; } - plane->state = &vps->base; - plane->state->plane = plane; - plane->state->rotation = DRM_MODE_ROTATE_0; + __drm_atomic_helper_plane_reset(plane, &vps->base); }