[Intel-gfx] [PATCH] drm: Fire off KMS hotplug events if probe detect says the connector is connected

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Thu Apr 18 08:09:29 UTC 2019

The hotplug detection routine of drm_helper_hpd_irq_event() can detect
changing of status of connector, but it can not detect changing of
properties of the connector.
e.g. changing of edid while suspend/resume, changing of dp lanes in dp aux.

Following scenario explains one of them; A detection of changing of edid.

 1) plug display device to a connector
 2) system suspend
 3) unplug 1)'s display device and plug the other display device to a
 4) system resume

To solve explained cases, It fires off KMS hotplug events if
drm_helper_probe_detect() says the connector is connected.

Testcase: igt/kms_chamelium/hdmi-edid-change-during-hibernate
Testcase: igt/kms_chamelium/hdmi-edid-change-during-suspend
Testcase: igt/kms_chamelium/dp-edid-change-during-hibernate
Testcase: igt/kms_chamelium/dp-edid-change-during-suspend

Suggested-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
Link: https://lists.freedesktop.org/archives/dri-devel/2019-April/214572.html
 drivers/gpu/drm/drm_probe_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 6fd08e04b323..081a849104f2 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -780,7 +780,8 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev)
-		if (old_status != connector->status)
+		if (old_status != connector->status ||
+		    connector->status == connector_status_connected)
 			changed = true;

More information about the Intel-gfx mailing list