1
0
Fork 0

MLK-20117 drm/imx/dcss: fix color issue when Adobe_ARGB gamut is used

Adobe ARGB gamut was selected even if the output pipe pixel encoding was
YUV. That produced a pink tint on the screen.

This patch will make sure the Adobe ARGB gamut is selected only when the
output pipe pixel encoding is RGB.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
pull/10/head
Laurentiu Palcu 2018-11-13 11:01:36 +02:00
parent 08ac01ad71
commit 34e6d1babc
1 changed files with 4 additions and 1 deletions

View File

@ -191,13 +191,16 @@ void dcss_crtc_setup_opipe(struct drm_crtc *crtc, struct drm_connector *conn,
if ((colorimetry & BIT(HDMI_EXTENDED_COLORIMETRY_BT2020)) ||
(colorimetry & BIT(HDMI_EXTENDED_COLORIMETRY_BT2020_CONST_LUM)))
dcss_crtc->opipe_g = G_REC2020;
else if (colorimetry & BIT(HDMI_EXTENDED_COLORIMETRY_ADOBE_RGB))
else if ((colorimetry & BIT(HDMI_EXTENDED_COLORIMETRY_ADOBE_RGB)) &&
!(crtc->state->adjusted_mode.private_flags & YUV_MODE))
dcss_crtc->opipe_g = G_ADOBE_ARGB;
else
dcss_crtc->opipe_g = G_REC709;
if ((eotf & (1 << 2)) && dcss_crtc->opipe_g == G_REC2020)
dcss_crtc->opipe_nl = NL_REC2084;
else if (dcss_crtc->opipe_g == G_ADOBE_ARGB)
dcss_crtc->opipe_nl = NL_SRGB;
else
dcss_crtc->opipe_nl = NL_REC709;