Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Bypass sink detect when there are no eDPs connected

[How & Why]
Check DC config to determine if there are any eDPs connected. If there
are no eDPs connected, bypass sink detect when querying eDP presence.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Jake Wang <haonan.wang2@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Solomon Chiu <solomon.chiu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jake Wang and committed by
Alex Deucher
b0942618 45150cd2

+6 -7
+6 -7
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 1096 1096 { 1097 1097 struct dc_link *edp_links[MAX_NUM_EDP]; 1098 1098 struct dc_link *edp_link = NULL; 1099 + enum dc_connection_type type; 1099 1100 int i; 1100 1101 int edp_num; 1101 - bool edp_sink_present = true; 1102 1102 1103 1103 get_edp_links(dc, edp_links, &edp_num); 1104 1104 if (!edp_num) 1105 1105 return; 1106 1106 1107 - if (dc->config.edp_not_connected) { 1108 - edp_sink_present = false; 1109 - } else { 1110 - enum dc_connection_type type; 1111 - for (i = 0; i < edp_num; i++) { 1112 - edp_link = edp_links[i]; 1107 + for (i = 0; i < edp_num; i++) { 1108 + edp_link = edp_links[i]; 1109 + if (dc->config.edp_not_connected) { 1110 + edp_link->edp_sink_present = false; 1111 + } else { 1113 1112 dc_link_detect_sink(edp_link, &type); 1114 1113 edp_link->edp_sink_present = (type != dc_connection_none); 1115 1114 }