[PATCH v4 3/9] drm/bridge-connector: implement glue code for HDMI connector
Maxime Ripard
mripard at kernel.org
Mon Jun 3 09:14:30 UTC 2024
Hi,
On Fri, May 31, 2024 at 11:07:26PM GMT, Dmitry Baryshkov wrote:
> +static int drm_bridge_connector_clear_infoframe(struct drm_connector *connector,
> + enum hdmi_infoframe_type type)
> +{
> + struct drm_bridge_connector *bridge_connector =
> + to_drm_bridge_connector(connector);
> + struct drm_bridge *bridge;
> +
> + bridge = bridge_connector->bridge_hdmi;
> + if (!bridge)
> + return -EINVAL;
> +
> + if (bridge->funcs->hdmi_clear_infoframe)
> + return bridge->funcs->hdmi_clear_infoframe(bridge, type);
> + else
> + return 0;
> +}
> +
> +static int drm_bridge_connector_write_infoframe(struct drm_connector *connector,
> + enum hdmi_infoframe_type type,
> + const u8 *buffer, size_t len)
> +{
> + struct drm_bridge_connector *bridge_connector =
> + to_drm_bridge_connector(connector);
> + struct drm_bridge *bridge;
> +
> + bridge = bridge_connector->bridge_hdmi;
> + if (!bridge)
> + return -EINVAL;
> +
> + return bridge->funcs->hdmi_write_infoframe(bridge, type, buffer, len);
> +}
Sorry, I didn't notice it before, but I think it would be good to try to
make clear_infoframe mandatory just like write_infoframe. It wasn't
possible for the main helpers because we didn't have enough info for
some drivers, but I think we should try to make it mandatory, and be
prepared to relax it if needs be.
With that fixed:
Acked-by: Maxime Ripard <mripard at kernel.org>
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20240603/7ce91e7c/attachment-0001.sig>
More information about the dri-devel
mailing list