drm/bridge/dw-hdmi: HDMI Hotplug Detection Issue on i.MX8MP

Derouiche, Oualid oualid.derouiche at kontron.de
Wed Aug 6 13:52:16 UTC 2025


Dear Linux DRM Maintainers,

I hope this message finds you well.

I'm currently troubleshooting an HDMI hot-plug detection issue and would greatly appreciate any insights or suggestions you might have. Below is a brief description of the problem:

Platform: i.MX8MP
Driver: fsl,imx8mp-hdmi

We're experiencing a bad behavior with certain monitors (specifically Terra monitors). On initial boot, when the HDMI cable is already connected, the correct resolution is applied. However, if the cable is unplugged and then reconnected, the resolution is incorrect, and EDID is not being read. (please see attached Log). After several reconnection attempts, the correct resolution is eventually applied.

Log1 - With Failure

imx8mp-dw-hdmi 32fd8000.hdmi: EVENT=plugin
[ 2602.231703] imx8mp-dw-hdmi 32fd8000.hdmi: read_hpd result: 1
[ 2602.231714] imx-lcdif 32fc6000.display-controller: [drm:check_connector_changed] [CONNECTOR:35:HDMI-A-1] status updated from disconnected to connected
[ 2602.231735] imx-lcdif 32fc6000.display-controller: [drm:check_connector_changed] [CONNECTOR:35:HDMI-A-1] Changed epoch counter 37 => 38
[ 2602.231751] [drm:drm_mode_object_get] OBJ ID: 35 (2)
[ 2602.231765] imx-lcdif 32fc6000.display-controller: [drm:drm_sysfs_connector_hotplug_event] [CONNECTOR:35:HDMI-A-1] generating connector hotplug event
[ 2602.231815] imx-lcdif 32fc6000.display-controller: [drm:drm_fb_helper_hotplug_event.part.0]
[ 2602.231827] [drm:drm_client_modeset_probe]
[ 2602.231836] [drm:drm_mode_object_get] OBJ ID: 35 (3)
[ 2602.231848] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:35:HDMI-A-1]
[ 2602.231942] i2c i2c-1: <i2c_imx_xfer_common> transfer message: 0
[ 2602.231951] i2c i2c-1: <i2c_imx_write> write slave address: addr=0xa0
[ 2602.231996] i2c i2c-1: <i2c_imx_trx_complete> TRX complete
[ 2602.232004] i2c i2c-1: <i2c_imx_acked> No ACK
[ 2602.232015] i2c i2c-1: <i2c_imx_xfer_common> exit with: error: -6
[ 2602.232025] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter 30a30000.i2c
[ 2602.232037] imx8mp-dw-hdmi 32fd8000.hdmi: failed to get edid
[ 2602.232043] drm_add_override_edid_modes
[ 2602.232057] drm_add_modes_noedid

Log2 - work correctly

[  209.462094] imx8mp-dw-hdmi 32fd8000.hdmi: EVENT=plugin
[  209.464913] imx8mp-dw-hdmi 32fd8000.hdmi: read_hpd result: 1
[  209.464927] imx-lcdif 32fc6000.display-controller: [drm:check_connector_changed] [CONNECTOR:35:HDMI-A-1] status updated from disconnected to connected
[  209.472468] imx-lcdif 32fc6000.display-controller: [drm:check_connector_changed] [CONNECTOR:35:HDMI-A-1] Changed epoch counter 15 => 16
[  209.472484] [drm:drm_mode_object_get] OBJ ID: 35 (2)
[  209.472516] imx-lcdif 32fc6000.display-controller: [drm:drm_sysfs_connector_hotplug_event] [CONNECTOR:35:HDMI-A-1] generating connector hotplug event
[  209.472577] imx-lcdif 32fc6000.display-controller: [drm:drm_fb_helper_hotplug_event.part.0]
[  209.472588] [drm:drm_client_modeset_probe]
[  209.472597] [drm:drm_mode_object_get] OBJ ID: 35 (3)
[  209.472608] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:35:HDMI-A-1]
[  209.472711] i2c i2c-1: <i2c_imx_xfer_common> transfer message: 0
[  209.482814] i2c i2c-1: <i2c_imx_write> write slave address: addr=0xa0
[  209.482881] i2c i2c-1: <i2c_imx_trx_complete> TRX complete
[  209.482890] i2c i2c-1: <i2c_imx_acked> ACK received
[  209.482896] i2c i2c-1: <i2c_imx_write> write data
[  209.482902] i2c i2c-1: <i2c_imx_write> write byte: B0=0x0
[  209.482946] i2c i2c-1: <i2c_imx_trx_complete> TRX complete
[  209.482953] i2c i2c-1: <i2c_imx_acked> ACK received
[  209.482959] i2c i2c-1: <i2c_imx_xfer_common> repeated start


It seems to be a timing-related problem between the EDID read via ddc and HPD signal handling, a workaround by adding a 100 ms delay to the dw_hdmi_phy_read_hpd() function resolves the issue (please see attached).

Patch1

--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -1686,8 +1686,13 @@ static void dw_hdmi_phy_disable(struct dw_hdmi *hdmi, void *data)
enum drm_connector_status dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi,
                                               void *data)
{
-       return hdmi_readb(hdmi, HDMI_PHY_STAT0) & HDMI_PHY_HPD ?
+       enum drm_connector_status stat = hdmi_readb(hdmi, HDMI_PHY_STAT0) & HDMI_PHY_HPD ?
                connector_status_connected : connector_status_disconnected;
+
+       if (stat == connector_status_connected)
+               msleep(100);
+
+       return stat;
}
EXPORT_SYMBOL_GPL(dw_hdmi_phy_read_hpd);

it work also with the following :

Patch2

--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -587,6 +587,10 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
                              drm_mode_prune_invalid(dev, &connector->modes, false);
                              goto exit;
               }
+
+             /*need some delay before reading the EDID somehow the I2C sink slave controller in same monitor are late */
+             set_current_state(TASK_INTERRUPTIBLE);
+             schedule_timeout(msecs_to_jiffies(10));
                count = drm_helper_probe_get_modes(connector);
--

I've also tried applying different patches from the following series (https://patchwork.kernel.org/project/dri-devel/cover/20240908132823.3308029-1-jonas@kwiboo.se/), but unfortunately it did not resolve the issue.

I'd appreciate any hint or any guidance on what a proper, upstream-compatible solution might look like , I don't think this workaround will be a proper one.
Thank you in advance for your time and support. I look forward to your feedback.


Mit freundlichen Grüßen / Best Regards


i. A. Oualid Derouiche
Entwicklung / Development

oualid.derouiche at kontron.de <mailto:oualid.derouiche at kontron.de>
www.kontron-electronics.de<https://www.kontron-electronics.de>

[cid:image001.png at 01DC06E9.E54A7140]

Kontron Electronics GmbH
Max-Planck-Str. 6 | 72636 Frickenhausen | Germany


[cid:image002.png at 01DC06E9.E54A7140]<https://www.kontron-electronics.de/>   [cid:image003.png at 01DC06E9.E54A7140] <https://www.linkedin.com/company/kontron>    [cid:image004.png at 01DC06E9.E54A7140] <https://www.facebook.com/kontron>    [cid:image005.png at 01DC06E9.E54A7140] <https://www.instagram.com/kontron_ag/>    [cid:image006.png at 01DC06E9.E54A7140] <https://www.youtube.com/@kontron>    [cid:image007.png at 01DC06E9.E54A7140] <https://www.kontron.com/en/blog>


Die gesetzlichen Pflichtangaben finden Sie  hier <https://www.kontron-electronics.de/impressum/>
Unsere Datenschutzerklärung finden Sie  hier <https://www.kontron-electronics.de/datenschutz>

[cid:image008.png at 01DC06E9.E54A7140]<https://online.bernexpo.ch/webshop/258/tickets>


[cid:image009.png at 01DC06E9.E54A7140]






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8080 bytes
Desc: image001.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 978 bytes
Desc: image002.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 520 bytes
Desc: image003.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 493 bytes
Desc: image004.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 979 bytes
Desc: image005.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 487 bytes
Desc: image006.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 652 bytes
Desc: image007.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 23482 bytes
Desc: image008.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0016.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.png
Type: image/png
Size: 137911 bytes
Desc: image009.png
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250806/aadc4479/attachment-0017.png>


More information about the dri-devel mailing list