]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/display: hdmi: Do not read EDID on disconnected connectors
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Mon, 13 Jan 2025 13:36:18 +0000 (15:36 +0200)
committerMaxime Ripard <mripard@kernel.org>
Tue, 14 Jan 2025 17:53:33 +0000 (18:53 +0100)
The recently introduced hotplug event handler in the HDMI Connector
framework attempts to unconditionally read the EDID data, leading to a
bunch of non-harmful, yet quite annoying DDC/I2C related errors being
reported.

Ensure the operation is done only for connectors having the status
connected or unknown.  Additionally, perform an explicit reset of the
connector information when dealing with a disconnected status.

Fixes: ab716b74dc9d ("drm/display/hdmi: implement hotplug functions")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113-hdmi-conn-edid-read-fix-v2-1-d2a0438a44ab@collabora.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/display/drm_hdmi_state_helper.c

index daaf68b80e5fe189d52bec07ca3f0c774dcb956e..9b2ee2385634303ab84bdd3a457770cfe32647cf 100644 (file)
@@ -791,6 +791,8 @@ drm_atomic_helper_connector_hdmi_update(struct drm_connector *connector,
        if (status == connector_status_disconnected) {
                // TODO: also handle CEC and scramber, HDMI sink disconnected.
                drm_connector_hdmi_audio_plugged_notify(connector, false);
+               drm_edid_connector_update(connector, NULL);
+               return;
        }
 
        if (connector->hdmi.funcs->read_edid)