[PATCH v3 6/6] drm/rockchip: dw_hdmi_qp: Advertise BT.709 and BT.2020 colorimetries

From: Jan Claußen

Date: Sun Oct 18 2026 - 08:33:09 EST


Expose BT.2020 RGB and YCC colorimetry so userspace can enable HDR
output. Also explicitly expose BT.709 YCC as it is listed in the
Rockchip RK3588 TRM V1.0-Part2 20220309 data sheet.

Tested on a Radxa Rock 5B (RK3588) with an LG OLED55B87LC in KDE
Plasma 6.7.5: enabling HDR switches the colorspace to BT.2020, and
disabling it restores the default.

Signed-off-by: Jan Claußen <jan.claussen10@xxxxxx>
---

Not sure if BT.709 needs to be explicitly exposed here, but it is mentioned in the data sheet.
Might be covered by DRM_MODE_COLORIMETRY_DEFAULT though.

BT.709/BT.2020 YCC are untested.

drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index 9c4cf68d79d5..dbb87dfd000c 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -605,6 +605,10 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444) |
BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422);

+ plat_data.supported_colorspaces = BIT(DRM_MODE_COLORIMETRY_BT709_YCC) |
+ BIT(DRM_MODE_COLORIMETRY_BT2020_RGB) |
+ BIT(DRM_MODE_COLORIMETRY_BT2020_YCC);
+
encoder = &hdmi->encoder.encoder;
encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);

--
2.56.0