aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1016-drm-amd-dal-drop-bios_power_down-and-unused-set_scra.patch
blob: 2e03825551fbde976de1ba126b8a9f781d0520ab (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
From 0fbccffaa6cc447843e521ce04cd48b3eb4045da Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 11 Apr 2016 17:42:31 +1000
Subject: [PATCH 1016/1110] drm/amd/dal: drop bios_power_down and unused
 set_scratch_lcd_scale API

Drop 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      | 16 ------------
 .../gpu/drm/amd/dal/dc/bios/bios_parser_helper.c   | 17 -------------
 .../gpu/drm/amd/dal/dc/bios/bios_parser_helper.h   |  3 ---
 .../dal/dc/bios/dce110/bios_parser_helper_dce110.c | 11 --------
 .../dal/dc/bios/dce80/bios_parser_helper_dce80.c   | 29 ----------------------
 drivers/gpu/drm/amd/dal/dc/dc_bios_types.h         |  3 ---
 6 files changed, 79 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 fe3cc60..91b7d2b 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
@@ -148,15 +148,6 @@ void dal_bios_parser_destroy(struct dc_bios **dcb)
 	*dcb = NULL;
 }
 
-void dc_bios_power_down(struct dc_bios *dcb)
-{
-#if defined(CONFIG_DRM_AMD_DAL_VBIOS_PRESENT)
-	struct bios_parser *bp = BP_FROM_DCB(dcb);
-
-	dal_bios_parser_set_scratch_lcd_scale(bp, bp->lcd_scale);
-#endif
-}
-
 void dc_bios_power_up(struct dc_bios *dcb)
 {
 #if defined(CONFIG_DRM_AMD_DAL_VBIOS_PRESENT)
@@ -4642,13 +4633,6 @@ static bool is_display_config_changed(
 	return false;
 }
 
-static void set_scratch_lcd_scale(
-	struct dc_bios *bios,
-	enum lcd_scale scale)
-{
-	BREAK_TO_DEBUGGER();
-}
-
 static enum lcd_scale get_scratch_lcd_scale(
 	struct dc_bios *bios)
 {
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c
index 4204798..af7a3b8 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c
@@ -106,23 +106,6 @@ bool dal_bios_parser_is_display_config_changed(
 }
 
 /**
-* dal_bios_parser_set_scratch_lcd_scale
-*
-* @brief
-*  update VBIOS scratch pad registers about LCD scale
-*
-* @param
-*  bool - to set to full panel mode or aspect-ratio mode
-*/
-void dal_bios_parser_set_scratch_lcd_scale(
-	struct bios_parser *bp,
-	enum lcd_scale scale)
-{
-	bp->bios_helper->set_scratch_lcd_scale(
-		bp->ctx, scale);
-}
-
-/**
 * dal_bios_parser_get_scratch_lcd_scale
 *
 * @brief
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 124a11e..a8e10c9 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
@@ -72,9 +72,6 @@ struct bios_parser_helper {
 	void (*set_scratch_active_and_requested)(
 		struct dc_context *ctx,
 		struct vbios_helper_data *d);
-	void (*set_scratch_lcd_scale)(
-		struct dc_context *ctx,
-		enum lcd_scale lcd_scale_request);
 	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 442e2a3..16a63ea 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
@@ -326,16 +326,6 @@ void dce110_set_scratch_critical_state(struct dc_context *ctx,
 	dm_write_reg(ctx, addr, value);
 }
 
-static void set_scratch_lcd_scale(
-	struct dc_context *ctx,
-	enum lcd_scale lcd_scale_request)
-{
-	DAL_LOGGER_NOT_IMPL(
-		LOG_MINOR_COMPONENT_BIOS,
-		"Bios Parser:%s\n",
-		__func__);
-}
-
 static bool is_lid_open(struct dc_context *ctx)
 {
 	uint32_t bios_scratch6;
@@ -371,7 +361,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = {
 			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,
-	.set_scratch_lcd_scale = set_scratch_lcd_scale,
 	.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 3963129..a7e42b5 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
@@ -352,34 +352,6 @@ static void set_scratch_active_and_requested(
 	d->requested = 0;
 }
 
-static void set_scratch_lcd_scale(
-	struct dc_context *ctx,
-	enum lcd_scale lcd_scale_request)
-{
-	uint32_t reg;
-
-	reg = dm_read_reg(ctx, mmBIOS_SCRATCH_6);
-
-	reg &= ~ATOM_S6_REQ_LCD_EXPANSION_FULL;
-	reg &= ~ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO;
-
-	switch (lcd_scale_request) {
-	case LCD_SCALE_FULLPANEL:
-		/* set Lcd Scale to Full Panel Mode */
-		reg |= ATOM_S6_REQ_LCD_EXPANSION_FULL;
-		break;
-	case LCD_SCALE_ASPECTRATIO:
-		/* set Lcd Scale to Aspect-Ratio Mode */
-		reg |= ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO;
-		break;
-	case LCD_SCALE_NONE:
-	default:
-		break;
-	}
-
-	dm_write_reg(ctx, mmBIOS_SCRATCH_6, reg);
-}
-
 static enum lcd_scale get_scratch_lcd_scale(
 	struct dc_context *ctx)
 {
@@ -665,7 +637,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = {
 	.set_scratch_acc_mode_change = set_scratch_acc_mode_change,
 	.set_scratch_active_and_requested = set_scratch_active_and_requested,
 	.set_scratch_critical_state = set_scratch_critical_state,
-	.set_scratch_lcd_scale = set_scratch_lcd_scale,
 	.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 7e37a72..a6fd93a 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h
@@ -40,7 +40,6 @@
 
 uint8_t dc_bios_get_connectors_number(struct dc_bios *bios);
 
-void dc_bios_power_down(struct dc_bios *bios);
 void dc_bios_power_up(struct dc_bios *bios);
 
 uint8_t dc_bios_get_encoders_number(struct dc_bios *bios);
@@ -130,8 +129,6 @@ bool dc_bios_is_lid_open(struct dc_bios *bios);
 bool dc_bios_is_lid_status_changed(struct dc_bios *bios);
 bool dc_bios_is_display_config_changed(struct dc_bios *bios);
 
-void dc_bios_set_scratch_lcd_scale(struct dc_bios *bios,
-				   enum lcd_scale scale);
 enum lcd_scale  dc_bios_get_scratch_lcd_scale(struct dc_bios *bios);
 void dc_bios_get_bios_event_info(struct dc_bios *bios,
 				 struct bios_event_info *info);
-- 
2.7.4