aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0541-drm-amd-dal-add-active-dongle-downstream-hotplug-han.patch
blob: 9f4ea4ee019fb539c693aff8a86f83aaf8739d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
From d0cba8cced836a355e30dfccf70c90f3ee7d39fa Mon Sep 17 00:00:00 2001
From: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Date: Mon, 30 Nov 2015 16:50:11 -0500
Subject: [PATCH 0541/1110] drm/amd/dal: add active dongle downstream hotplug
 handling

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/core/dc.c      | 16 ++++++++--------
 drivers/gpu/drm/amd/dal/dc/core/dc_link.c |  8 +++-----
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c
index 286bdde..60cbb47 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c
@@ -839,17 +839,17 @@ void dc_link_remove_sink(struct dc_link *link, const struct dc_sink *sink)
 	int i;
 
 	if (!link->sink_count) {
-	   BREAK_TO_DEBUGGER();
-	   return;
+		BREAK_TO_DEBUGGER();
+		return;
 	}
 
 	for (i = 0; i < link->sink_count; i++) {
-		   if (link->sink[i] == sink) {
-			   dc_sink_release(sink);
-			   link->sink[i] = NULL;
-			   link->sink_count--;
-			   return;
-		   }
+		if (link->sink[i] == sink) {
+			dc_sink_release(sink);
+			link->sink[i] = NULL;
+			link->sink_count--;
+			return;
+		}
 	}
 
 	BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
index 2ae41c7..ba087b3 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
@@ -355,9 +355,7 @@ static bool is_dp_active_dongle(enum display_dongle_type dongle_type)
 		dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER);
 }
 
-/* TODO: To beretired because this call is wrong with
- * pluging in of active-dongle without display*/
-static void link_unplug(struct core_link *link)
+static void link_disconnect_all_sinks(struct core_link *link)
 {
 	int i;
 
@@ -476,7 +474,7 @@ void dc_link_detect(const struct dc_link *dc_link)
 						/* active dongle unplug
 						 * processing for short irq
 						 */
-						link_unplug(link);
+						link_disconnect_all_sinks(link);
 						return;
 					}
 
@@ -640,7 +638,7 @@ void dc_link_detect(const struct dc_link *dc_link)
 		default:
 			break;
 		}
-		link_unplug(link);
+		link_disconnect_all_sinks(link);
 	}
 
 	LINK_INFO("link=%d, dc_sink_in=%p is now %s\n",
-- 
2.7.4