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 #ifndef __DAL_BIOS_PARSER_TYPES_H__
27
28 #define __DAL_BIOS_PARSER_TYPES_H__
29
30 #include "dm_services.h"
31 #include "include/signal_types.h"
32 #include "include/grph_object_ctrl_defs.h"
33 #include "include/gpio_types.h"
34 #include "include/link_service_types.h"
35
36
37 enum as_signal_type {
38 AS_SIGNAL_TYPE_NONE = 0L,
39 AS_SIGNAL_TYPE_DVI,
40 AS_SIGNAL_TYPE_HDMI,
41 AS_SIGNAL_TYPE_LVDS,
42 AS_SIGNAL_TYPE_DISPLAY_PORT,
43 AS_SIGNAL_TYPE_GPU_PLL,
44 AS_SIGNAL_TYPE_XGMI,
45 AS_SIGNAL_TYPE_UNKNOWN
46 };
47
48 enum bp_result {
49 BP_RESULT_OK = 0,
50 BP_RESULT_BADINPUT,
51 BP_RESULT_BADBIOSTABLE,
52 BP_RESULT_UNSUPPORTED,
53 BP_RESULT_NORECORD,
54 BP_RESULT_FAILURE
55 };
56
57 enum bp_encoder_control_action {
58
59 ENCODER_CONTROL_DISABLE = 0,
60 ENCODER_CONTROL_ENABLE,
61 ENCODER_CONTROL_SETUP,
62 ENCODER_CONTROL_INIT
63 };
64
65 enum bp_transmitter_control_action {
66
67 TRANSMITTER_CONTROL_DISABLE = 0,
68 TRANSMITTER_CONTROL_ENABLE,
69 TRANSMITTER_CONTROL_BACKLIGHT_OFF,
70 TRANSMITTER_CONTROL_BACKLIGHT_ON,
71 TRANSMITTER_CONTROL_BACKLIGHT_BRIGHTNESS,
72 TRANSMITTER_CONTROL_LCD_SETF_TEST_START,
73 TRANSMITTER_CONTROL_LCD_SELF_TEST_STOP,
74 TRANSMITTER_CONTROL_INIT,
75 TRANSMITTER_CONTROL_DEACTIVATE,
76 TRANSMITTER_CONTROL_ACTIAVATE,
77 TRANSMITTER_CONTROL_SETUP,
78 TRANSMITTER_CONTROL_SET_VOLTAGE_AND_PREEMPASIS,
79
80
81
82 TRANSMITTER_CONTROL_POWER_ON,
83
84
85
86 TRANSMITTER_CONTROL_POWER_OFF
87 };
88
89 enum bp_external_encoder_control_action {
90 EXTERNAL_ENCODER_CONTROL_DISABLE = 0,
91 EXTERNAL_ENCODER_CONTROL_ENABLE = 1,
92 EXTERNAL_ENCODER_CONTROL_INIT = 0x7,
93 EXTERNAL_ENCODER_CONTROL_SETUP = 0xf,
94 EXTERNAL_ENCODER_CONTROL_UNBLANK = 0x10,
95 EXTERNAL_ENCODER_CONTROL_BLANK = 0x11,
96 };
97
98 enum bp_pipe_control_action {
99 ASIC_PIPE_DISABLE = 0,
100 ASIC_PIPE_ENABLE,
101 ASIC_PIPE_INIT
102 };
103
104 struct bp_encoder_control {
105 enum bp_encoder_control_action action;
106 enum engine_id engine_id;
107 enum transmitter transmitter;
108 enum signal_type signal;
109 enum dc_lane_count lanes_number;
110 enum dc_color_depth color_depth;
111 bool enable_dp_audio;
112 uint32_t pixel_clock;
113 };
114
115 struct bp_external_encoder_control {
116 enum bp_external_encoder_control_action action;
117 enum engine_id engine_id;
118 enum dc_link_rate link_rate;
119 enum dc_lane_count lanes_number;
120 enum signal_type signal;
121 enum dc_color_depth color_depth;
122 bool coherent;
123 struct graphics_object_id encoder_id;
124 struct graphics_object_id connector_obj_id;
125 uint32_t pixel_clock;
126 };
127
128 struct bp_crtc_source_select {
129 enum engine_id engine_id;
130 enum controller_id controller_id;
131
132 enum signal_type signal;
133
134 enum signal_type sink_signal;
135 enum display_output_bit_depth display_output_bit_depth;
136 bool enable_dp_audio;
137 };
138
139 struct bp_transmitter_control {
140 enum bp_transmitter_control_action action;
141 enum engine_id engine_id;
142 enum transmitter transmitter;
143 enum dc_lane_count lanes_number;
144 enum clock_source_id pll_id;
145 enum signal_type signal;
146 enum dc_color_depth color_depth;
147 enum hpd_source_id hpd_sel;
148 struct graphics_object_id connector_obj_id;
149
150
151
152 uint32_t pixel_clock;
153 uint32_t lane_select;
154 uint32_t lane_settings;
155 bool coherent;
156 bool multi_path;
157 bool single_pll_mode;
158 };
159
160 struct bp_hw_crtc_timing_parameters {
161 enum controller_id controller_id;
162
163 uint32_t h_total;
164 uint32_t h_addressable;
165 uint32_t h_overscan_left;
166 uint32_t h_overscan_right;
167 uint32_t h_sync_start;
168 uint32_t h_sync_width;
169
170
171 uint32_t v_total;
172 uint32_t v_addressable;
173 uint32_t v_overscan_top;
174 uint32_t v_overscan_bottom;
175 uint32_t v_sync_start;
176 uint32_t v_sync_width;
177
178 struct timing_flags {
179 uint32_t INTERLACE:1;
180 uint32_t PIXEL_REPETITION:4;
181 uint32_t HSYNC_POSITIVE_POLARITY:1;
182 uint32_t VSYNC_POSITIVE_POLARITY:1;
183 uint32_t HORZ_COUNT_BY_TWO:1;
184 } flags;
185 };
186
187 struct bp_adjust_pixel_clock_parameters {
188
189 enum signal_type signal_type;
190
191 struct graphics_object_id encoder_object_id;
192
193
194
195 uint32_t pixel_clock;
196
197 uint32_t adjusted_pixel_clock;
198
199
200 uint32_t reference_divider;
201
202
203 uint32_t pixel_clock_post_divider;
204
205 bool ss_enable;
206 };
207
208 struct bp_pixel_clock_parameters {
209 enum controller_id controller_id;
210 enum clock_source_id pll_id;
211
212 enum signal_type signal_type;
213
214
215 uint32_t target_pixel_clock_100hz;
216
217 uint32_t reference_divider;
218
219 uint32_t feedback_divider;
220
221 uint32_t fractional_feedback_divider;
222
223 uint32_t pixel_clock_post_divider;
224 struct graphics_object_id encoder_object_id;
225
226
227 uint32_t dfs_bypass_display_clock;
228
229 enum transmitter_color_depth color_depth;
230
231 struct program_pixel_clock_flags {
232 uint32_t FORCE_PROGRAMMING_OF_PLL:1;
233
234
235 uint32_t USE_E_CLOCK_AS_SOURCE_FOR_D_CLOCK:1;
236
237 uint32_t SET_EXTERNAL_REF_DIV_SRC:1;
238
239 uint32_t SET_DISPCLK_DFS_BYPASS:1;
240
241 uint32_t PROGRAM_PHY_PLL_ONLY:1;
242
243 uint32_t SUPPORT_YUV_420:1;
244
245 uint32_t SET_XTALIN_REF_SRC:1;
246
247 uint32_t SET_GENLOCK_REF_DIV_SRC:1;
248 } flags;
249 };
250
251 enum bp_dce_clock_type {
252 DCECLOCK_TYPE_DISPLAY_CLOCK = 0,
253 DCECLOCK_TYPE_DPREFCLK = 1
254 };
255
256
257 struct bp_set_dce_clock_parameters {
258 enum clock_source_id pll_id;
259
260 uint32_t target_clock_frequency;
261
262 enum bp_dce_clock_type clock_type;
263
264 struct set_dce_clock_flags {
265 uint32_t USE_GENERICA_AS_SOURCE_FOR_DPREFCLK:1;
266
267 uint32_t USE_XTALIN_AS_SOURCE_FOR_DPREFCLK:1;
268
269 uint32_t USE_PCIE_AS_SOURCE_FOR_DPREFCLK:1;
270
271 uint32_t USE_GENLOCK_AS_SOURCE_FOR_DPREFCLK:1;
272 } flags;
273 };
274
275 struct spread_spectrum_flags {
276
277 uint32_t CENTER_SPREAD:1;
278
279 uint32_t EXTERNAL_SS:1;
280
281 uint32_t DS_TYPE:1;
282 };
283
284 struct bp_spread_spectrum_parameters {
285 enum clock_source_id pll_id;
286 uint32_t percentage;
287 uint32_t ds_frac_amount;
288
289 union {
290 struct {
291 uint32_t step;
292 uint32_t delay;
293 uint32_t range;
294 } ver1;
295 struct {
296 uint32_t feedback_amount;
297 uint32_t nfrac_amount;
298 uint32_t ds_frac_size;
299 } ds;
300 };
301
302 struct spread_spectrum_flags flags;
303 };
304
305 struct bp_encoder_cap_info {
306 uint32_t DP_HBR2_CAP:1;
307 uint32_t DP_HBR2_EN:1;
308 uint32_t DP_HBR3_EN:1;
309 uint32_t HDMI_6GB_EN:1;
310 uint32_t DP_IS_USB_C:1;
311 uint32_t RESERVED:27;
312 };
313
314 #endif