[RFCv2 PATCH 3/5] drm/bridge: dw_hdmi: add HDMI notifier support
Pierre-Hugues Husson
phh at phh.me
Sun Feb 5 00:22:53 UTC 2017
Hi
2016-11-14 16:22 GMT+01:00 Hans Verkuil <hverkuil at xs4all.nl>:
> From: Russell King <rmk+kernel at arm.linux.org.uk>
>
> Add HDMI notifiers to the HDMI bridge driver.
> @@ -1448,9 +1450,11 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
> hdmi->sink_is_hdmi = drm_detect_hdmi_monitor(edid);
> hdmi->sink_has_audio = drm_detect_monitor_audio(edid);
> drm_mode_connector_update_edid_property(connector, edid);
> + hdmi_event_new_edid(hdmi->n, edid, 0);
Considering current hdmi-notifier code, the size must not be 0
Should this be done this way?
> hdmi_event_new_edid(hdmi->n, edid, (edid->extensions + 1) * EDID_LENGTH);
> ret = drm_add_edid_modes(connector, edid);
> /* Store the ELD */
> drm_edid_to_eld(connector, edid);
> + hdmi_event_new_eld(hdmi->n, connector->eld);
> kfree(edid);
> } else {
> dev_dbg(hdmi->dev, "failed to get edid\n");
> @@ -1579,6 +1583,12 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
> dw_hdmi_update_phy_mask(hdmi);
> }
> mutex_unlock(&hdmi->mutex);
> +
> + if ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) == 0)
> + hdmi_event_disconnect(hdmi->n);
> + else if ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) ==
> + (HDMI_IH_PHY_STAT0_RX_SENSE | HDMI_PHY_HPD))
> + hdmi_event_connect(hdmi->n);
On rk3288, I never get this event (connect) to trigger, everything
else (disconnect/edid/eld) are ok though. (which is enough for CEC)
I'll need some extra debugging...
Do you have a platform to test on, which does trigger this event?
More information about the dri-devel
mailing list