Re: [PATCH v3 2/3] drm/bridge: Add ITE IT61620 MIPI DSI to HDMI bridge driver
From: Jani Nikula
Date: Thu Oct 09 2025 - 08:49:16 EST
On Thu, 09 Oct 2025, Pet Weng <pet.weng@xxxxxxxxxx> wrote:
> +static void it61620_set_capability_from_edid_parse(struct it61620 *it61620,
> + const struct edid *edid)
> +{
> + struct drm_device *drm = it61620->drm;
> +
> + it61620->is_hdmi = drm_detect_hdmi_monitor(edid);
> + it61620->en_audio = drm_detect_monitor_audio(edid);
Please don't add new users of drm_detect_monitor_audio() or
drm_detect_hdmi_monitor(). They're basically deprecated.
Use drm_edid_connector_update() and you can get at the same info via
connector->display_info.{is_hdmi,has_audio} members.
> +
> + drm_dbg(drm, "%s mode, monitor %ssupport audio",
> + it61620->is_hdmi ? "HDMI" : "DVI",
> + it61620->en_audio ? "" : "not ");
> +}
> +static const struct drm_edid *it61620_bridge_edid_read(struct drm_bridge *bridge,
> + struct drm_connector *connector)
> +{
> + struct it61620 *it61620 = bridge_to_it61620(bridge);
> + struct device *dev = it61620->dev;
> + const struct drm_edid *cached_edid;
> +
> + cached_edid = drm_edid_read_custom(connector, it61620_get_edid_block,
> + it61620);
> +
> + if (!cached_edid) {
> + dev_dbg(dev, "failed to get edid!");
> + return NULL;
> + }
> +
> + it61620_set_capability_from_edid_parse(it61620,
> + drm_edid_raw(cached_edid));
Please don't add new users of drm_edid_raw(). It's for transitioning
from struct edid to struct drm_edid only, and you should not add new
uses of struct edid either.
BR,
Jani.
> + return cached_edid;
> +}
--
Jani Nikula, Intel