drm/rockchip: Add reflection properties
authorDaniele Castagna <dcastagna@chromium.org>
Wed, 9 Jan 2019 18:56:39 +0000 (15:56 -0300)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 10 Jan 2019 23:44:10 +0000 (00:44 +0100)
commit677e8bbc0e5a9fafe6f7d26354547a95ae978f12
tree1356e71dcb0e0b9fde34dff00b1596a5589dc7c0
parentfbb1c7382671fc5986349366890572b291fac527
drm/rockchip: Add reflection properties

Add the KMS plane rotation property to the DRM rockchip driver,
for SoCs RK3328, RK3368 and RK3399.

RK3288 only supports rotation at the display level (i.e. CRTC),
but for now we are only interested in plane rotation.

This commit only adds support for the value of reflect-y
and reflect-x (i.e. mirroring).

Note that y-mirroring is not compatible with YUV.

The following modetest commands would test this feature,
where 30 is the plane ID, and 49 = rotate_0 + relect_y + reflect_x.

X mirror:
modetest -s 43@33:1920x1080@XR24 -w 30:rotation:17

Y mirror:
modetest -s 43@33:1920x1080@XR24 -w 30:rotation:33

XY mirror:
modetest -s 43@33:1920x1080@XR24 -w 30:rotation:49

Signed-off-by: Daniele Castagna <dcastagna@chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20190109185639.5093-4-ezequiel@collabora.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
drivers/gpu/drm/rockchip/rockchip_vop_reg.c