[PATCH 07/23] drm/amd/display: Bypass sink detect when there are no eDPs connected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jake Wang <haonan.wang2@xxxxxxx>

[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.

Signed-off-by: Jake Wang <haonan.wang2@xxxxxxx>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@xxxxxxx>
Acked-by: Solomon Chiu <solomon.chiu@xxxxxxx>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 3dc49964ea7f..dffd150180ec 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1096,20 +1096,19 @@ static void detect_edp_presence(struct dc *dc)
 {
 	struct dc_link *edp_links[MAX_NUM_EDP];
 	struct dc_link *edp_link = NULL;
+	enum dc_connection_type type;
 	int i;
 	int edp_num;
-	bool edp_sink_present = true;
 
 	get_edp_links(dc, edp_links, &edp_num);
 	if (!edp_num)
 		return;
 
-	if (dc->config.edp_not_connected) {
-			edp_sink_present = false;
-	} else {
-		enum dc_connection_type type;
-		for (i = 0; i < edp_num; i++) {
-			edp_link = edp_links[i];
+	for (i = 0; i < edp_num; i++) {
+		edp_link = edp_links[i];
+		if (dc->config.edp_not_connected) {
+			edp_link->edp_sink_present = false;
+		} else {
 			dc_link_detect_sink(edp_link, &type);
 			edp_link->edp_sink_present = (type != dc_connection_none);
 		}
-- 
2.29.0

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux