[PATCH v9 15/19] drm/connector: Register color format property on HDMI connectors

Nicolas Frattaroli
2026-02-27T19:22:40Z

The drmm_connector_hdmi_init function can figure out what DRM color
formats are supported by a particular connector based on the supported
HDMI format bitmask that's passed in.

Use it to register the drm color format property.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
drivers/gpu/drm/drm_connector.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index a4907e15dfc5..0f4e24446a9e 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -627,6 +627,9 @@ int drmm_connector_hdmi_init(struct drm_device *dev,
if (max_bpc > 8)
drm_connector_attach_hdr_output_metadata_property(connector);

+ if (!drm_mode_create_color_format_property(connector, supported_formats))
+ drm_connector_attach_color_format_property(connector);
+
connector->hdmi.funcs = hdmi_funcs;

return 0;

--
2.53.0