OSDN Git Service

drm/omap: fix YUV422 rotation with TILER
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 15 May 2017 08:09:25 +0000 (11:09 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Jun 2017 08:08:59 +0000 (11:08 +0300)
commitc4df6e4277503f0d05e261c3cae0c282fdca4437
treec2b9ff0e6de68efdc8665aa21b0d8c1e1cf7367a
parent16f9ede51ff9b37e04fb64dad8b4099c2814c436
drm/omap: fix YUV422 rotation with TILER

TILER rotation with YUV422 pixelformats does not work at the moment. All
other pixel formats work, because the pixelformat's pixel size is equal
to tiler unit size (e.g. XR24's pixel size is 32 bits, and the TILER
unit size that has to be used is 32 bits).

For YUV422 formats this is not the case, as the TILER unit size has to
be 32 bits, but the pixel size is 16 bits. The end result is OCP errors
and sync losts.

This patch adds the code to adjust the variables for YUV422 formats.

We could make the code more generic by passing around the pixel format,
rotation type, angle and the tiler unit size, which would allow us to do
calculations without special case for YUV422. However, this would make
the code more complex, and at least for now this is much more easier to
handle with these two special cases for YUV422.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/omapdrm/dss/dispc.c
drivers/gpu/drm/omapdrm/omap_fb.c