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 <[email protected]>
Signed-off-by: Nicolas Frattaroli <[email protected]>
---
 drivers/gpu/drm/drm_connector.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index e848374dee0b..724245d2df29 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -627,6 +627,10 @@ int drmm_connector_hdmi_init(struct drm_device *dev,
        if (max_bpc > 8)
                drm_connector_attach_hdr_output_metadata_property(connector);
 
+       ret = drm_connector_attach_color_format_property(connector, 
supported_formats);
+       if (ret)
+               return ret;
+
        connector->hdmi.funcs = hdmi_funcs;
 
        return 0;

-- 
2.53.0

Reply via email to