MLK-19274: drm: imx: dcss: add rotation functionality
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Mon, 20 Aug 2018 08:27:29 +0000 (11:27 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit7790185ae2d32afb632e62e8aa84c93a6d6e6ae9
tree2d96f6bbcd1cfeff9c99525e1ba048690a4c6d44
parent6681876a60a2a4e141f75f812197daf9273f912c
MLK-19274: drm: imx: dcss: add rotation functionality

This patch will allow userspace to rotate planes by setting the
'rotation' property. Generally, 0 and 180 rotations are allowed for
pretty much all 8-bit xRGB and 2-plane YUV420 formats. 90/270 rotations
can be performed only for non-compressed tiled GPU xRGB formats. Tiled
YUV420 formats do not allow rotations at all because these formats need
DTRC for de-tiling and DTRC has no rotation support.

For more info, consult the DPR Features chapter in the reference manual.

Test example:

modetest -M imx-drm -w 27:rotation:4 -w 32:rotation:33 -w 27:alpha:30 -s
42@31:3840x2160-60@XR24 -P 32@31:3840x2160@NV21

The above will perform:
 * 180 degree rotation of primary plane (XR24);
 * vertical flip of first overlay plane (rotate-0 | reflect-y);
 * set primary plane alpha to 30;

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/gpu/imx/dcss/dcss-dpr.c
include/video/imx-dcss.h