[Intel-gfx] [PATCH 2/5] drm/vmwgfx: Use drm_plane_helper_check_state()

Daniel Vetter daniel at ffwll.ch
Thu Nov 2 10:06:07 UTC 2017


On Wed, Nov 01, 2017 at 08:29:17PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Atomic drivers have no reason to use drm_plane_helper_check_update()
> instead of drm_plane_helper_check_state(). So let's switch over.
> 
> Cc: VMware Graphics <linux-graphics-maintainer at vmware.com>
> Cc: Sinclair Yeh <syeh at vmware.com>
> Cc: Thomas Hellstrom <thellstrom at vmware.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

I think the new atomic helper landed at about the same time vmwgfx landed,
hence why it wasn't converted.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 17 +++--------------
>  1 file changed, 3 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> index a4b56699679a..515b67783a41 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> @@ -442,29 +442,18 @@ int vmw_du_primary_plane_atomic_check(struct drm_plane *plane,
>  				      struct drm_plane_state *state)
>  {
>  	struct drm_framebuffer *new_fb = state->fb;
> -	bool visible;
> -
> -	struct drm_rect src = {
> -		.x1 = state->src_x,
> -		.y1 = state->src_y,
> -		.x2 = state->src_x + state->src_w,
> -		.y2 = state->src_y + state->src_h,
> -	};
> -	struct drm_rect dest = {
> +	struct drm_rect clip = {
>  		.x1 = state->crtc_x,
>  		.y1 = state->crtc_y,
>  		.x2 = state->crtc_x + state->crtc_w,
>  		.y2 = state->crtc_y + state->crtc_h,
>  	};
> -	struct drm_rect clip = dest;
>  	int ret;
>  
> -	ret = drm_plane_helper_check_update(plane, state->crtc, new_fb,
> -					    &src, &dest, &clip,
> -					    DRM_MODE_ROTATE_0,
> +	ret = drm_plane_helper_check_state(state, &clip,
>  					    DRM_PLANE_HELPER_NO_SCALING,
>  					    DRM_PLANE_HELPER_NO_SCALING,
> -					    false, true, &visible);
> +					    false, true);
>  
>  
>  	if (!ret && new_fb) {
> -- 
> 2.13.6
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list