Re: [PATCH 6/7] drm/omap: fix YUV422 rotation with TILER

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

 



Hi Tomi,

On Wednesday 24 May 2017 09:50:49 Tomi Valkeinen wrote:
> On 24/05/17 09:44, Laurent Pinchart wrote:
> >> b/drivers/gpu/drm/omapdrm/omap_fb.c index bd05976fc20b..e5cc13799e73
> >> 100644
> >> --- a/drivers/gpu/drm/omapdrm/omap_fb.c
> >> +++ b/drivers/gpu/drm/omapdrm/omap_fb.c
> >> @@ -184,16 +184,30 @@ void omap_framebuffer_update_scanout(struct
> >> drm_framebuffer *fb,
> >> 
> >>  		orient = drm_rotation_to_tiler(state->rotation);
> >> 
> >> +		/*
> >> +		 * omap_gem_rotated_paddr() wants the x & y in tiler units.
> >> +		 * Usually tiler unit size is the same as the pixel size,
> >> except
> >> +		 * for YUV422 formats, for which the tiler unit size is 32
> >> bits
> >> +		 * and pixel size is 16 bits.
> >> +		 */
> >> +		if (fb->format->format == DRM_FORMAT_UYVY ||
> >> +				fb->format->format == DRM_FORMAT_YUYV) {
> > 
> > That's a very peculiar indentation.
> 
> Well, not really if you don't want to mix tabs and spaces. If there was
> just one tab on the second line, it would align with the lines below,
> making it confusing.

You mix tabs and places in other patches in this series ;-)

> >> +			x /= 2;
> >> +			w /= 2;
> >> +		}
> >> +
> >>  		/* adjust x,y offset for flip/invert: */
> >>  		if (orient & MASK_Y_INVERT)
> >>  			y += h - 1;
> >>  		
> >>  			x += w - 1;
> >> 
> >> +		/* Note: x and y are in TILER units, not pixels */
> >>  		omap_gem_rotated_dma_addr(plane->bo, orient, x, y,
> >>  					  &info->paddr);
> >>  		info->rotation_type = OMAP_DSS_ROT_TILER;
> >>  		info->rotation = state->rotation ?: DRM_ROTATE_0;
> >> +		/* Note: stride in TILER units, not pixels */
> > 
> > Nitpicking, I would have combined the two comments.
> 
> Perhaps... I found myself mixing up pixels and tiler units all the time,
> so I wanted to highlight the fact in the places where it's mixed up.

-- 
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