diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2019-01-18 15:51:17 +0100 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-01-18 19:01:54 +0100 |
commit | b38f61f52e54e2bded103ce6bf8acaa914fd6960 (patch) | |
tree | efdbc118d7800fac784a4104dd4ad6bf3c7ddec2 /drivers/gpu/drm/sun4i/sun4i_frontend.h | |
parent | e6ae40bd9407bf2c5b356ad1f160321b3a21a01a (diff) |
drm/sun4i: frontend: Configure and enable YUV to RGB CSC when needed
In prevision of adding support for YUV formats, set the YUV to RGB
colorspace conversion coefficients if required and don't bypass the
CSC engine when converting.
The BT601 coefficients from the A33 BSP are copied over from the backend
code. Because of module inter-dependency, we can't have the frontend use
these coefficients from the backend directly.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190118145133.21281-8-paul.kocialkowski@bootlin.com
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_frontend.h')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_frontend.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.h b/drivers/gpu/drm/sun4i/sun4i_frontend.h index 3df2bd8a7a95..17b46ecf7d9e 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.h +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.h @@ -35,6 +35,8 @@ #define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888 1 #define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888 2 +#define SUN4I_FRONTEND_CSC_COEF_REG(c) (0x070 + (0x4 * (c))) + #define SUN4I_FRONTEND_CH0_INSIZE_REG 0x100 #define SUN4I_FRONTEND_INSIZE(h, w) ((((h) - 1) << 16) | (((w) - 1))) |