]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1a17f3a5b5c18dc938ddf1a6759b93552b32277e
treec2b9ff0e6de68efdc8665aa21b0d8c1e1cf7367a
parentd6670135fd34bc109a1a25c6b2a9254e0ec2e1f2
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