Check that connector initialized by drmm_connector_hdmi_init() supports AVI InfoFrames and warn if it doesn't support Vendor-Specific InfofRames (HDMI InfoFrames are more or less required).
Suggested-by: Maxime Ripard <mrip...@kernel.org> Acked-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.barysh...@oss.qualcomm.com> --- drivers/gpu/drm/drm_connector.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 92a75684a0f7375d3a94e8c666cb71064ecc8035..222a0ef66d9fdbdb56108ceeb40e7f369d810350 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -602,6 +602,13 @@ int drmm_connector_hdmi_init(struct drm_device *dev, if (!(max_bpc == 8 || max_bpc == 10 || max_bpc == 12)) return -EINVAL; + /* AVI is required */ + if (!(supported_infoframes & DRM_CONNECTOR_INFOFRAME_AVI)) + return -EINVAL; + + if (!(supported_infoframes & DRM_CONNECTOR_INFOFRAME_VENDOR)) + drm_info(dev, "HDMI connector with no support for Vendor-Specific InfoFrame\n"); + ret = drmm_connector_init(dev, connector, funcs, connector_type, ddc); if (ret) return ret; -- 2.47.3