drm: mali-dp: Add YUV->RGB conversion support for video layers
authorMihail Atanassov <mihail.atanassov@arm.com>
Tue, 7 Nov 2017 15:30:46 +0000 (15:30 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Wed, 14 Mar 2018 11:41:01 +0000 (11:41 +0000)
commit6e810eb508f4b937bc2a718bd4e5cd74cca55500
tree810d91419b893a863a4a5e2853ff0031ed8c1ae6
parent57085dca982bd042f64aa23f5e03747595b2c8c0
drm: mali-dp: Add YUV->RGB conversion support for video layers

Internally Mali DP uses an RGB pipeline so video layers that support
YUV input buffers need to convert the input data to RGB. The YUV
buffers can have various encodings and this patch introduces support
for BT.601, BT.709 and BT.2020 encodings, both limited and full ranges.

This patch adds support for specifying the color encoding of the
input buffers for the planes that are backed by the video layers
and programs the YUV2RGB coefficients into hardware based on the
selected encoding.

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
[updated to use standard properties]
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/malidp_hw.c
drivers/gpu/drm/arm/malidp_hw.h
drivers/gpu/drm/arm/malidp_planes.c
drivers/gpu/drm/arm/malidp_regs.h