aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/2456-amdgpu-dc-kill-some-deadcode-in-dc-core.patch
blob: 1542201b9c1a46fd41496a0dcb2062c7d03e055c (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
From 8f89d0ffc71356b914956345220f049390382a1c Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Tue, 3 Oct 2017 15:11:00 +1000
Subject: [PATCH 2456/4131] amdgpu/dc: kill some deadcode in dc core.

Moves one function to an inline, but kills a bunch of deadcode.

Change-Id: I21d18c5c5145b26b05d42ab25503dba1b07ffb64
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 91 --------------------------------
 drivers/gpu/drm/amd/display/dc/dc.h      |  9 ++--
 2 files changed, 4 insertions(+), 96 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index d3ffd66..64d4ed3 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -575,30 +575,6 @@ static bool construct(struct dc *dc,
 	return false;
 }
 
-/*
-void ProgramPixelDurationV(unsigned int pixelClockInKHz )
-{
-	fixed31_32 pixel_duration = Fixed31_32(100000000, pixelClockInKHz) * 10;
-	unsigned int pixDurationInPico = round(pixel_duration);
-
-	DPG_PIPE_ARBITRATION_CONTROL1 arb_control;
-
-	arb_control.u32All = ReadReg (mmDPGV0_PIPE_ARBITRATION_CONTROL1);
-	arb_control.bits.PIXEL_DURATION = pixDurationInPico;
-	WriteReg (mmDPGV0_PIPE_ARBITRATION_CONTROL1, arb_control.u32All);
-
-	arb_control.u32All = ReadReg (mmDPGV1_PIPE_ARBITRATION_CONTROL1);
-	arb_control.bits.PIXEL_DURATION = pixDurationInPico;
-	WriteReg (mmDPGV1_PIPE_ARBITRATION_CONTROL1, arb_control.u32All);
-
-	WriteReg (mmDPGV0_PIPE_ARBITRATION_CONTROL2, 0x4000800);
-	WriteReg (mmDPGV0_REPEATER_PROGRAM, 0x11);
-
-	WriteReg (mmDPGV1_PIPE_ARBITRATION_CONTROL2, 0x4000800);
-	WriteReg (mmDPGV1_REPEATER_PROGRAM, 0x11);
-}
-*/
-
 /*******************************************************************************
  * Public functions
  ******************************************************************************/
@@ -1518,28 +1494,6 @@ struct dc_stream_state *dc_get_stream_at_index(struct dc *dc, uint8_t i)
 	return NULL;
 }
 
-struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index)
-{
-	return dc->links[link_index];
-}
-
-const struct graphics_object_id dc_get_link_id_at_index(
-	struct dc *dc, uint32_t link_index)
-{
-	return dc->links[link_index]->link_id;
-}
-
-enum dc_irq_source dc_get_hpd_irq_source_at_index(
-	struct dc *dc, uint32_t link_index)
-{
-	return dc->links[link_index]->irq_source_hpd;
-}
-
-const struct audio **dc_get_audios(struct dc *dc)
-{
-	return (const struct audio **)dc->res_pool->audios;
-}
-
 void dc_flip_plane_addrs(
 		struct dc *dc,
 		struct dc_plane_state *const plane_states[],
@@ -1814,17 +1768,6 @@ struct dc_sink *dc_link_add_remote_sink(
 	return NULL;
 }
 
-void dc_link_set_sink(struct dc_link *link, struct dc_sink *sink)
-{
-	link->local_sink = sink;
-
-	if (sink == NULL) {
-		link->type = dc_connection_none;
-	} else {
-		link->type = dc_connection_single;
-	}
-}
-
 void dc_link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink)
 {
 	int i;
@@ -1850,37 +1793,3 @@ void dc_link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink)
 		}
 	}
 }
-
-bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data)
-{
-	int i;
-	struct mem_input *mi = NULL;
-
-	for (i = 0; i < dc->res_pool->pipe_count; i++) {
-		if (dc->res_pool->mis[i] != NULL) {
-			mi = dc->res_pool->mis[i];
-			break;
-		}
-	}
-	if (mi == NULL) {
-		dm_error("no mem_input!\n");
-		return false;
-	}
-
-	if (dc->hwss.update_dchub)
-		dc->hwss.update_dchub(dc->hwseq, dh_data);
-	else
-		ASSERT(dc->hwss.update_dchub);
-
-
-	return true;
-
-}
-
-void dc_log_hw_state(struct dc *dc)
-{
-
-	if (dc->hwss.log_hw_state)
-		dc->hwss.log_hw_state(dc);
-}
-
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index b99f436..5b6fe4d 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -277,10 +277,6 @@ struct dc *dc_create(const struct dc_init_data *init_params);
 
 void dc_destroy(struct dc **dc);
 
-bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data);
-
-void dc_log_hw_state(struct dc *dc);
-
 /*******************************************************************************
  * Surface Interfaces
  ******************************************************************************/
@@ -878,7 +874,10 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *dc_link);
  * boot time.  They cannot be created or destroyed.
  * Use dc_get_caps() to get number of links.
  */
-struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index);
+static inline struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index)
+{
+	return dc->links[link_index];
+}
 
 /* Set backlight level of an embedded panel (eDP, LVDS). */
 bool dc_link_set_backlight_level(const struct dc_link *dc_link, uint32_t level,
-- 
2.7.4