summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sun4i/sun8i_csc.h
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@siol.net>2019-07-13 15:03:46 +0300
committerMaxime Ripard <maxime.ripard@bootlin.com>2019-07-20 08:38:09 +0300
commitb72cb0dc4c46fe75a52a9adb4a13ba1213e50000 (patch)
tree66ca73f53da7b226cc26dc2d2a7d80f594322fec /drivers/gpu/drm/sun4i/sun8i_csc.h
parentab38c3b7c3472a6626aceb12fc2a23828152daf3 (diff)
downloadlinux-b72cb0dc4c46fe75a52a9adb4a13ba1213e50000.tar.xz
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
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun8i_csc.h')
-rw-r--r--drivers/gpu/drm/sun4i/sun8i_csc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun8i_csc.h b/drivers/gpu/drm/sun4i/sun8i_csc.h
index dce4c444bcd6..f42441b1b14d 100644
--- a/drivers/gpu/drm/sun4i/sun8i_csc.h
+++ b/drivers/gpu/drm/sun4i/sun8i_csc.h
@@ -6,6 +6,8 @@
#ifndef _SUN8I_CSC_H_
#define _SUN8I_CSC_H_
+#include <drm/drm_color_mgmt.h>
+
struct sun8i_mixer;
/* VI channel CSC units offsets */
@@ -26,7 +28,9 @@ enum sun8i_csc_mode {
};
void sun8i_csc_set_ccsc_coefficients(struct sun8i_mixer *mixer, int layer,
- enum sun8i_csc_mode mode);
+ enum sun8i_csc_mode mode,
+ enum drm_color_encoding encoding,
+ enum drm_color_range range);
void sun8i_csc_enable_ccsc(struct sun8i_mixer *mixer, int layer, bool enable);
#endif