[PATCH] drm/amd/display: If HPD fails probe EDID to decide if monitor is present

Mario Limonciello mario.limonciello at amd.com
Mon Aug 14 19:32:32 UTC 2023


Some monitors return that they're disconnected while powered off
but the EDID can still be accessed.  Before determining that a
link is not available, try to access the EDID.

Reported-and-suggested-by: dark_sylinc at yahoo.com.ar
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/461
Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
Cc: Harry Wentland <Harry.Wentland at amd.com>
---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index c9b6676eaf53..26a739128dd3 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -1233,6 +1233,8 @@ bool link_detect_connection_type(struct dc_link *link, enum dc_connection_type *
 	if (is_hpd_high) {
 		*type = dc_connection_single;
 		/* TODO: need to do the actual detection */
+	} else if (dm_helpers_read_local_edid(link->ctx, link, link->local_sink) == EDID_OK) {
+		*type = dc_connection_single;
 	} else {
 		*type = dc_connection_none;
 		if (link->connector_signal == SIGNAL_TYPE_EDP) {
-- 
2.34.1



More information about the amd-gfx mailing list