drm/rockchip: Support YUV formats with U/V swapped
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 14 Jan 2022 07:40:38 +0000 (15:40 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 2 May 2022 22:04:17 +0000 (00:04 +0200)
commit3fa50896c35982afb59ad5bcbe04ec2e91bb54a5
tree77c1bedcb865b8d7d8b729bb8199b8db3af1b853
parentd2eabdb64474c2101953859601794f1ea08ec1d9
drm/rockchip: Support YUV formats with U/V swapped

The VOP in Rockchip SoCs that support YUV planes also support swapping
of the U and V elements. Supporting the swapped variants, especially
NV21, would be beneficial for multimedia applications, as the hardware
video decoders only output NV21, and supporting this pixel format in
the display pipeline would allow the decoded video frames to be output
directly.

Add support for this to support the various formats that have U/V
swapped.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220114074038.2633848-1-wenst@chromium.org
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
drivers/gpu/drm/rockchip/rockchip_vop_reg.c