drm/rockchip: dw_hdmi: Fix hdmi does not switch seamlessly when hdr colorspace isn't bt2020

Even if colorspace of hdr video is not bt2020, it can be
seamlessly switched to yuv422 10bit in scenarios where
sink supports yuv422.

Change-Id: Ieb2c9a3c17183349caa70d5a3ba07ccf1b14252a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2025-03-12 18:29:22 +08:00
committed by Tao Huang
parent b9e7be7146
commit 2eeed1b87d

View File

@@ -2466,8 +2466,8 @@ dw_hdmi_rockchip_select_output(struct drm_connector_state *conn_state,
*enc_out_encoding = V4L2_YCBCR_ENC_BT2020;
yuv422_out = true;
/* bt709 hdr output */
} else if ((hdmi->colorimetry <= DRM_MODE_COLORIMETRY_BT2020_CYCC) &&
(hdmi->colorimetry >= DRM_MODE_COLORIMETRY_BT2020_YCC) &&
} else if (((hdmi->colorimetry <= DRM_MODE_COLORIMETRY_BT2020_CYCC) ||
(hdmi->colorimetry >= DRM_MODE_COLORIMETRY_BT2020_YCC)) &&
(conn_state->connector->hdr_sink_metadata.hdmi_type1.eotf & BIT(*eotf) &&
*eotf > HDMI_EOTF_TRADITIONAL_GAMMA_SDR)) {
*enc_out_encoding = V4L2_YCBCR_ENC_709;