aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0700-drm-amd-dal-added-dc_link_add_sink-interface-for-man.patch
blob: 606f1761db5533eb3eb57706c17b65a0a30860bd (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
From 348ab42bdeacf933ca78f92203acebb3b7dadb33 Mon Sep 17 00:00:00 2001
From: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Date: Tue, 19 Jan 2016 15:08:38 -0500
Subject: [PATCH 0700/1110] drm/amd/dal: added dc_link_add_sink interface for
 manually adding sinks

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/core/dc.c | 11 +++++++++++
 drivers/gpu/drm/amd/dal/dc/dc.h      |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c
index 737ed87..4e87da5 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c
@@ -861,6 +861,17 @@ bool dc_link_add_remote_sink(const struct dc_link *link, struct dc_sink *sink)
 	return true;
 }
 
+void dc_link_add_sink(const struct dc_link *link, struct dc_sink *sink)
+{
+	struct core_link *core_link = DC_LINK_TO_LINK(link);
+	struct dc_link *dc_link = &core_link->public;
+
+	dc_link->local_sink = sink;
+	dc_link->sink_count = 1;
+	if (sink->sink_signal == SIGNAL_TYPE_VIRTUAL
+		&& link->connector_signal == SIGNAL_TYPE_VIRTUAL)
+		dc_link->type = dc_connection_single;
+}
 
 void dc_link_remove_remote_sink(const struct dc_link *link, const struct dc_sink *sink)
 {
diff --git a/drivers/gpu/drm/amd/dal/dc/dc.h b/drivers/gpu/drm/amd/dal/dc/dc.h
index 341c968..c541ecf 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc.h
@@ -317,6 +317,8 @@ void dc_link_remove_remote_sink(
 	const struct dc_link *link,
 	const struct dc_sink *sink);
 
+/* Used by diagnostics for virtual link at the moment */
+void dc_link_add_sink(const struct dc_link *link, struct dc_sink *sink);
 
 /*******************************************************************************
  * Sink Interfaces - A sink corresponds to a display output device
-- 
2.7.4