]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: sun8i-csc: Add support for color encoding and range
authorJernej Skrabec <jernej.skrabec@siol.net>
Sat, 13 Jul 2019 12:03:46 +0000 (14:03 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Sat, 20 Jul 2019 05:38:09 +0000 (07:38 +0200)
commit69ea432f4c77356b35d88468f3a8673620a8796f
tree66ca73f53da7b226cc26dc2d2a7d80f594322fec
parenta5c3d74286f8e4294c8e4b5e2df641a8382c0341
drm/sun4i: sun8i-csc: Add support for color encoding and range

Conversion from YUV to RGB depends on range (limited or full) and
encoding (BT.601 or BT.709). Current code doesn't consider this and
always uses BT.601 encoding and limited range.

Fix this by introducing new CSC matrices, which are selected based on
range and encoding parameters.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190713120346.30349-4-jernej.skrabec@siol.net
drivers/gpu/drm/sun4i/sun8i_csc.c
drivers/gpu/drm/sun4i/sun8i_csc.h
drivers/gpu/drm/sun4i/sun8i_vi_layer.c