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]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Daniel Stone <[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 41a5ab1e563e..b91c1f76355e 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.54.0
