Re: [PATCH 2/7] drm/omap: remove omap_drm_win

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tomi,

Thank you for the patch.

On Wednesday 17 May 2017 10:56:39 Tomi Valkeinen wrote:
> struct omap_drm_window is only used to pass plane setup data to
> omap_framebuffer_update_scanout(). This can as well be accomplished by
> just passing the DRM state.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.h   | 11 +----------
>  drivers/gpu/drm/omapdrm/omap_fb.c    | 35 +++++++++++++++-----------------
>  drivers/gpu/drm/omapdrm/omap_plane.c | 25 +------------------------
>  3 files changed, 20 insertions(+), 51 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h
> b/drivers/gpu/drm/omapdrm/omap_drv.h index ca087a993909..4bd1e9070b31
> 100644

[snip]

> diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c
> b/drivers/gpu/drm/omapdrm/omap_fb.c index 4fc5db5d2d29..b7e7038cd2ce 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fb.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fb.c

[snip]

> @@ -164,25 +164,27 @@ void omap_framebuffer_update_scanout(struct
> drm_framebuffer *fb,
> 
>  	info->fourcc = fb->format->format;
> 
> -	info->pos_x      = win->crtc_x;
> -	info->pos_y      = win->crtc_y;
> -	info->out_width  = win->crtc_w;
> -	info->out_height = win->crtc_h;
> -	info->width      = win->src_w;
> -	info->height     = win->src_h;
> +	info->pos_x      = state->crtc_x;
> +	info->pos_y      = state->crtc_y;
> +	info->out_width  = state->crtc_w;
> +	info->out_height = state->crtc_h;
> +	info->width      = state->src_w >> 16;
> +	info->height     = state->src_h >> 16;
> 
> -	x = win->src_x;
> -	y = win->src_y;
> +	/* DSS driver wants the w & h in rotated orientation */
> +	if (drm_rotation_90_or_270(state->rotation))
> +		swap(info->width, info->height);
> +
> +	x = state->src_x >> 16;
> +	y = state->src_y >> 16;
> 
>  	if (omap_gem_flags(plane->bo) & OMAP_BO_TILED) {
> -		uint32_t w = win->src_w;
> -		uint32_t h = win->src_h;
> +		uint32_t w = state->src_w >> 16;
> +		uint32_t h = state->src_h >> 16;
> 
> -		orient = drm_rotation_to_tiler(win->rotation);
> +		orient = drm_rotation_to_tiler(state->rotation);
> 
>  		/* adjust x,y offset for flip/invert: */

s/flip\///

Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> -		if (orient & MASK_XY_FLIP)
> -			swap(w, h);
>  		if (orient & MASK_Y_INVERT)
>  			y += h - 1;
>  		if (orient & MASK_X_INVERT)

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux