aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1018-drm-amd-dal-more-dead-code.patch
blob: 1c842d9b35dcfbb8917aa6732504cc25b345c6f9 (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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
From f42a3b1aa1514af93a8e775bff1c02a10bd82211 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 11 Apr 2016 17:45:55 +1000
Subject: [PATCH 1018/1110] drm/amd/dal: more dead code

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c      | 15 -------
 .../gpu/drm/amd/dal/dc/bios/bios_parser_helper.h   |  3 --
 .../dal/dc/bios/dce110/bios_parser_helper_dce110.c | 52 ----------------------
 .../dal/dc/bios/dce80/bios_parser_helper_dce80.c   | 41 -----------------
 drivers/gpu/drm/amd/dal/dc/dc_bios_types.h         |  1 -
 5 files changed, 112 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
index 91b7d2b..cecb30e 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
@@ -4179,21 +4179,6 @@ void dc_bios_prepare_scratch_active_and_requested(struct dc_bios *dcb,
 #endif
 }
 
-void dc_bios_set_scratch_active_and_requested(struct dc_bios *dcb)
-{
-	struct bios_parser *bp = BP_FROM_DCB(dcb);
-
-#ifdef CONFIG_DRM_AMD_DAL_VBIOS_PRESENT
-	bp->bios_helper->set_scratch_active_and_requested(
-			bp->ctx,
-			&bp->vbios_helper_data);
-#else
-	dal_logger_write(bp->ctx->logger,
-			LOG_MAJOR_BIOS,
-			LOG_MINOR_BIOS_CMD_TABLE,
-			"%s: VBIOS is not supported", __func__);
-#endif
-}
 
 /*
  * get_integrated_info_v8
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h
index 6545f65..1e17e74 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h
+++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h
@@ -66,9 +66,6 @@ struct bios_parser_helper {
 		struct vbios_helper_data *data,
 		enum controller_id id, enum signal_type s,
 		const struct connector_device_tag_info *dev_tag);
-	void (*set_scratch_active_and_requested)(
-		struct dc_context *ctx,
-		struct vbios_helper_data *d);
 	enum lcd_scale (*get_scratch_lcd_scale)(
 		struct dc_context *ctx);
 	uint32_t (*fmt_control)(
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c
index 16a63ea..30cb2ee 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c
@@ -59,57 +59,6 @@ static void set_scratch_acc_mode_change(
 	dm_write_reg(ctx, addr, value);
 }
 
-/*
- * set_scratch_active_and_requested
- *
- * @brief
- * Set VBIOS scratch pad registers about active and requested displays
- *
- * @param
- * struct dc_context *ctx - [in] DAL context for register accessing
- * struct vbios_helper_data *d - [in] values to write
- */
-static void set_scratch_active_and_requested(
-	struct dc_context *ctx,
-	struct vbios_helper_data *d)
-{
-	uint32_t addr = 0;
-	uint32_t value = 0;
-
-	/* mmBIOS_SCRATCH_3 = mmBIOS_SCRATCH_0 + ATOM_ACTIVE_INFO_DEF */
-	addr = mmBIOS_SCRATCH_3;
-
-	value = dm_read_reg(ctx, addr);
-
-	value &= ~ATOM_S3_DEVICE_ACTIVE_MASK;
-	value |= (d->active & ATOM_S3_DEVICE_ACTIVE_MASK);
-
-	dm_write_reg(ctx, addr, value);
-
-	/* mmBIOS_SCRATCH_6 =  mmBIOS_SCRATCH_0 + ATOM_ACC_CHANGE_INFO_DEF */
-	addr = mmBIOS_SCRATCH_6;
-
-	value = dm_read_reg(ctx, addr);
-
-	value &= ~ATOM_S6_ACC_REQ_MASK;
-	value |= (d->requested & ATOM_S6_ACC_REQ_MASK);
-
-	dm_write_reg(ctx, addr, value);
-
-	/* mmBIOS_SCRATCH_5 =  mmBIOS_SCRATCH_0 + ATOM_DOS_REQ_INFO_DEF */
-	addr = mmBIOS_SCRATCH_5;
-
-	value = dm_read_reg(ctx, addr);
-
-	value &= ~ATOM_S5_DOS_REQ_DEVICEw0;
-	value |= (d->active & ATOM_S5_DOS_REQ_DEVICEw0);
-
-	dm_write_reg(ctx, addr, value);
-
-	d->active = 0;
-	d->requested = 0;
-}
-
 /**
  * get LCD Scale Mode from VBIOS scratch register
  */
@@ -360,7 +309,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = {
 	.prepare_scratch_active_and_requested =
 			prepare_scratch_active_and_requested,
 	.set_scratch_acc_mode_change = set_scratch_acc_mode_change,
-	.set_scratch_active_and_requested = set_scratch_active_and_requested,
 	.take_backlight_control = NULL,
 	.update_requested_backlight_level = NULL,
 };
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c b/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c
index 650a1ac..b9d01f3 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c
@@ -296,46 +296,6 @@ static void prepare_scratch_active_and_requested(
 	}
 }
 
-static void set_scratch_active_and_requested(
-	struct dc_context *ctx,
-	struct vbios_helper_data *d)
-{
-	uint32_t addr = 0;
-	uint32_t value = 0;
-
-	/* mmBIOS_SCRATCH_3 = mmBIOS_SCRATCH_0 + ATOM_ACTIVE_INFO_DEF */
-	addr = mmBIOS_SCRATCH_3;
-
-	value = dm_read_reg(ctx, addr);
-
-	value &= ~ATOM_S3_DEVICE_ACTIVE_MASK;
-	value |= (d->active & ATOM_S3_DEVICE_ACTIVE_MASK);
-
-	dm_write_reg(ctx, addr, value);
-
-	/* mmBIOS_SCRATCH_6 =  mmBIOS_SCRATCH_0 + ATOM_ACC_CHANGE_INFO_DEF */
-	addr = mmBIOS_SCRATCH_6;
-
-	value = dm_read_reg(ctx, addr);
-
-	value &= ~ATOM_S6_ACC_REQ_MASK;
-	value |= (d->requested & ATOM_S6_ACC_REQ_MASK);
-
-	dm_write_reg(ctx, addr, value);
-
-	/* mmBIOS_SCRATCH_5 =  mmBIOS_SCRATCH_0 + ATOM_DOS_REQ_INFO_DEF */
-	addr = mmBIOS_SCRATCH_5;
-
-	value = dm_read_reg(ctx, addr);
-
-	value &= ~ATOM_S5_DOS_REQ_DEVICEw0;
-	value |= (d->active & ATOM_S5_DOS_REQ_DEVICEw0);
-
-	dm_write_reg(ctx, addr, value);
-
-	d->active = 0;
-	d->requested = 0;
-}
 
 static enum lcd_scale get_scratch_lcd_scale(
 	struct dc_context *ctx)
@@ -620,7 +580,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = {
 	.prepare_scratch_active_and_requested =
 		prepare_scratch_active_and_requested,
 	.set_scratch_acc_mode_change = set_scratch_acc_mode_change,
-	.set_scratch_active_and_requested = set_scratch_active_and_requested,
 	.take_backlight_control = take_backlight_control,
 	.update_requested_backlight_level = update_requested_backlight_level,
 };
diff --git a/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h b/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h
index a6fd93a..73127c4 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h
@@ -148,7 +148,6 @@ void dc_bios_prepare_scratch_active_and_requested(struct dc_bios *bios,
 						  enum controller_id controller_id,
 						  enum signal_type signal,
 						  const struct connector_device_tag_info *device_tag);
-void dc_bios_set_scratch_active_and_requested(struct dc_bios *bios);
 void dc_bios_set_scratch_acc_mode_change(struct dc_bios *bios);
 
 /* COMMANDS */
-- 
2.7.4