Re: [PATCH v2 1/8] drm/connector: let drivers declare infoframes as unsupported

From: Liu Ying
Date: Wed Aug 20 2025 - 00:51:23 EST


On 08/19/2025, Dmitry Baryshkov wrote:

[...]

> @@ -930,23 +947,29 @@ static int write_device_infoframe(struct drm_connector *connector,
> union hdmi_infoframe *frame)
> {
> const struct drm_connector_hdmi_funcs *funcs = connector->hdmi.funcs;
> + enum hdmi_infoframe_type type = frame->any.type;
> struct drm_device *dev = connector->dev;
> u8 buffer[HDMI_INFOFRAME_SIZE(MAX)];
> int ret;
> int len;
>
> - drm_dbg_kms(dev, "Writing infoframe type %x\n", frame->any.type);
> + drm_dbg_kms(dev, "Writing infoframe type %x\n", type);
>
> if (!funcs || !funcs->write_infoframe) {
> drm_dbg_kms(dev, "Function not implemented, bailing.\n");
> return -EINVAL;
> }
>
> + if (!drm_hdmi_connector_supports_infoframe(connector, type)) {
> + drm_dbg_kms(dev, "Infoframe %d not supported, bailing.\n", type);

This '%d' should also be replaced with '0x%02x'.

> + return 0;
> + }

[...]

--
Regards,
Liu Ying