[PATCH v5 7/8] drm/rockchip: dw_hdmi_qp: Set the VOP2 color space from the connector

From: Jan Claußen

Date: Sat Nov 21 2026 - 08:13:22 EST


VOP2 converts RGB to YCbCr using the matrix selected by the CRTC
state's colorspace, but the HDMI encoder never sets it, so VOP2
always converts with BT.709. Once the colorspace property can
signal BT.2020 colorimetry to the sink, a YCbCr output would be
encoded with BT.709 and decoded with BT.2020.

Pass the connector colorspace on to VOP2, and do so before the
early return so that a colorspace change alone is applied.

Signed-off-by: Jan Claußen <jan.claussen10@xxxxxx>
---
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index f2a1ea8dfefa..24a28b5f4576 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -205,6 +205,8 @@ dw_hdmi_qp_rockchip_encoder_atomic_check(struct drm_encoder *encoder,
if (ingest_fmt < 0)
return -EINVAL;

+ s->colorspace = conn_state->colorspace;
+
if (hdmi->tmds_char_rate == conn_state->hdmi.tmds_char_rate &&
s->output_bpc == conn_state->hdmi.output_bpc &&
s->bus_format == ingest_fmt)
--
2.56.0