1*b843c749SSergey Zigachev /*
2*b843c749SSergey Zigachev  * Copyright 2012-15 Advanced Micro Devices, Inc.
3*b843c749SSergey Zigachev  *
4*b843c749SSergey Zigachev  * Permission is hereby granted, free of charge, to any person obtaining a
5*b843c749SSergey Zigachev  * copy of this software and associated documentation files (the "Software"),
6*b843c749SSergey Zigachev  * to deal in the Software without restriction, including without limitation
7*b843c749SSergey Zigachev  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*b843c749SSergey Zigachev  * and/or sell copies of the Software, and to permit persons to whom the
9*b843c749SSergey Zigachev  * Software is furnished to do so, subject to the following conditions:
10*b843c749SSergey Zigachev  *
11*b843c749SSergey Zigachev  * The above copyright notice and this permission notice shall be included in
12*b843c749SSergey Zigachev  * all copies or substantial portions of the Software.
13*b843c749SSergey Zigachev  *
14*b843c749SSergey Zigachev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*b843c749SSergey Zigachev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*b843c749SSergey Zigachev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*b843c749SSergey Zigachev  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*b843c749SSergey Zigachev  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*b843c749SSergey Zigachev  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*b843c749SSergey Zigachev  * OTHER DEALINGS IN THE SOFTWARE.
21*b843c749SSergey Zigachev  *
22*b843c749SSergey Zigachev  * Authors: AMD
23*b843c749SSergey Zigachev  *
24*b843c749SSergey Zigachev  */
25*b843c749SSergey Zigachev 
26*b843c749SSergey Zigachev #include "dm_services.h"
27*b843c749SSergey Zigachev 
28*b843c749SSergey Zigachev #include "atom.h"
29*b843c749SSergey Zigachev 
30*b843c749SSergey Zigachev #include "include/grph_object_id.h"
31*b843c749SSergey Zigachev #include "include/grph_object_defs.h"
32*b843c749SSergey Zigachev #include "include/bios_parser_types.h"
33*b843c749SSergey Zigachev 
34*b843c749SSergey Zigachev #include "../command_table_helper.h"
35*b843c749SSergey Zigachev 
encoder_action_to_atom(enum bp_encoder_control_action action)36*b843c749SSergey Zigachev static uint8_t encoder_action_to_atom(enum bp_encoder_control_action action)
37*b843c749SSergey Zigachev {
38*b843c749SSergey Zigachev 	uint8_t atom_action = 0;
39*b843c749SSergey Zigachev 
40*b843c749SSergey Zigachev 	switch (action) {
41*b843c749SSergey Zigachev 	case ENCODER_CONTROL_ENABLE:
42*b843c749SSergey Zigachev 		atom_action = ATOM_ENABLE;
43*b843c749SSergey Zigachev 		break;
44*b843c749SSergey Zigachev 	case ENCODER_CONTROL_DISABLE:
45*b843c749SSergey Zigachev 		atom_action = ATOM_DISABLE;
46*b843c749SSergey Zigachev 		break;
47*b843c749SSergey Zigachev 	case ENCODER_CONTROL_SETUP:
48*b843c749SSergey Zigachev 		atom_action = ATOM_ENCODER_CMD_SETUP;
49*b843c749SSergey Zigachev 		break;
50*b843c749SSergey Zigachev 	case ENCODER_CONTROL_INIT:
51*b843c749SSergey Zigachev 		atom_action = ATOM_ENCODER_INIT;
52*b843c749SSergey Zigachev 		break;
53*b843c749SSergey Zigachev 	default:
54*b843c749SSergey Zigachev 		BREAK_TO_DEBUGGER(); /* Unhandle action in driver.!! */
55*b843c749SSergey Zigachev 		break;
56*b843c749SSergey Zigachev 	}
57*b843c749SSergey Zigachev 
58*b843c749SSergey Zigachev 	return atom_action;
59*b843c749SSergey Zigachev }
60*b843c749SSergey Zigachev 
engine_bp_to_atom(enum engine_id id,uint32_t * atom_engine_id)61*b843c749SSergey Zigachev static bool engine_bp_to_atom(enum engine_id id, uint32_t *atom_engine_id)
62*b843c749SSergey Zigachev {
63*b843c749SSergey Zigachev 	bool result = false;
64*b843c749SSergey Zigachev 
65*b843c749SSergey Zigachev 	if (atom_engine_id != NULL)
66*b843c749SSergey Zigachev 		switch (id) {
67*b843c749SSergey Zigachev 		case ENGINE_ID_DIGA:
68*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DIG1_ENCODER_ID;
69*b843c749SSergey Zigachev 			result = true;
70*b843c749SSergey Zigachev 			break;
71*b843c749SSergey Zigachev 		case ENGINE_ID_DIGB:
72*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DIG2_ENCODER_ID;
73*b843c749SSergey Zigachev 			result = true;
74*b843c749SSergey Zigachev 			break;
75*b843c749SSergey Zigachev 		case ENGINE_ID_DIGC:
76*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DIG3_ENCODER_ID;
77*b843c749SSergey Zigachev 			result = true;
78*b843c749SSergey Zigachev 			break;
79*b843c749SSergey Zigachev 		case ENGINE_ID_DIGD:
80*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DIG4_ENCODER_ID;
81*b843c749SSergey Zigachev 			result = true;
82*b843c749SSergey Zigachev 			break;
83*b843c749SSergey Zigachev 		case ENGINE_ID_DIGE:
84*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DIG5_ENCODER_ID;
85*b843c749SSergey Zigachev 			result = true;
86*b843c749SSergey Zigachev 			break;
87*b843c749SSergey Zigachev 		case ENGINE_ID_DIGF:
88*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DIG6_ENCODER_ID;
89*b843c749SSergey Zigachev 			result = true;
90*b843c749SSergey Zigachev 			break;
91*b843c749SSergey Zigachev 		case ENGINE_ID_DIGG:
92*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DIG7_ENCODER_ID;
93*b843c749SSergey Zigachev 			result = true;
94*b843c749SSergey Zigachev 			break;
95*b843c749SSergey Zigachev 		case ENGINE_ID_DACA:
96*b843c749SSergey Zigachev 			*atom_engine_id = ASIC_INT_DAC1_ENCODER_ID;
97*b843c749SSergey Zigachev 			result = true;
98*b843c749SSergey Zigachev 			break;
99*b843c749SSergey Zigachev 		default:
100*b843c749SSergey Zigachev 			break;
101*b843c749SSergey Zigachev 		}
102*b843c749SSergey Zigachev 
103*b843c749SSergey Zigachev 	return result;
104*b843c749SSergey Zigachev }
105*b843c749SSergey Zigachev 
clock_source_id_to_atom(enum clock_source_id id,uint32_t * atom_pll_id)106*b843c749SSergey Zigachev static bool clock_source_id_to_atom(
107*b843c749SSergey Zigachev 	enum clock_source_id id,
108*b843c749SSergey Zigachev 	uint32_t *atom_pll_id)
109*b843c749SSergey Zigachev {
110*b843c749SSergey Zigachev 	bool result = true;
111*b843c749SSergey Zigachev 
112*b843c749SSergey Zigachev 	if (atom_pll_id != NULL)
113*b843c749SSergey Zigachev 		switch (id) {
114*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_PLL0:
115*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_PPLL0;
116*b843c749SSergey Zigachev 			break;
117*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_PLL1:
118*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_PPLL1;
119*b843c749SSergey Zigachev 			break;
120*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_PLL2:
121*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_PPLL2;
122*b843c749SSergey Zigachev 			break;
123*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_EXTERNAL:
124*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_PPLL_INVALID;
125*b843c749SSergey Zigachev 			break;
126*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_DFS:
127*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_EXT_PLL1;
128*b843c749SSergey Zigachev 			break;
129*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_VCE:
130*b843c749SSergey Zigachev 			/* for VCE encoding,
131*b843c749SSergey Zigachev 			 * we need to pass in ATOM_PPLL_INVALID
132*b843c749SSergey Zigachev 			 */
133*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_PPLL_INVALID;
134*b843c749SSergey Zigachev 			break;
135*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_DP_DTO:
136*b843c749SSergey Zigachev 			/* When programming DP DTO PLL ID should be invalid */
137*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_PPLL_INVALID;
138*b843c749SSergey Zigachev 			break;
139*b843c749SSergey Zigachev 		case CLOCK_SOURCE_ID_UNDEFINED:
140*b843c749SSergey Zigachev 			BREAK_TO_DEBUGGER(); /* check when this will happen! */
141*b843c749SSergey Zigachev 			*atom_pll_id = ATOM_PPLL_INVALID;
142*b843c749SSergey Zigachev 			result = false;
143*b843c749SSergey Zigachev 			break;
144*b843c749SSergey Zigachev 		default:
145*b843c749SSergey Zigachev 			result = false;
146*b843c749SSergey Zigachev 			break;
147*b843c749SSergey Zigachev 		}
148*b843c749SSergey Zigachev 
149*b843c749SSergey Zigachev 	return result;
150*b843c749SSergey Zigachev }
151*b843c749SSergey Zigachev 
clock_source_id_to_atom_phy_clk_src_id(enum clock_source_id id)152*b843c749SSergey Zigachev static uint8_t clock_source_id_to_atom_phy_clk_src_id(
153*b843c749SSergey Zigachev 		enum clock_source_id id)
154*b843c749SSergey Zigachev {
155*b843c749SSergey Zigachev 	uint8_t atom_phy_clk_src_id = 0;
156*b843c749SSergey Zigachev 
157*b843c749SSergey Zigachev 	switch (id) {
158*b843c749SSergey Zigachev 	case CLOCK_SOURCE_ID_PLL0:
159*b843c749SSergey Zigachev 		atom_phy_clk_src_id = ATOM_TRANSMITTER_CONFIG_V5_P0PLL;
160*b843c749SSergey Zigachev 		break;
161*b843c749SSergey Zigachev 	case CLOCK_SOURCE_ID_PLL1:
162*b843c749SSergey Zigachev 		atom_phy_clk_src_id = ATOM_TRANSMITTER_CONFIG_V5_P1PLL;
163*b843c749SSergey Zigachev 		break;
164*b843c749SSergey Zigachev 	case CLOCK_SOURCE_ID_PLL2:
165*b843c749SSergey Zigachev 		atom_phy_clk_src_id = ATOM_TRANSMITTER_CONFIG_V5_P2PLL;
166*b843c749SSergey Zigachev 		break;
167*b843c749SSergey Zigachev 	case CLOCK_SOURCE_ID_EXTERNAL:
168*b843c749SSergey Zigachev 		atom_phy_clk_src_id = ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SRC_EXT;
169*b843c749SSergey Zigachev 		break;
170*b843c749SSergey Zigachev 	default:
171*b843c749SSergey Zigachev 		atom_phy_clk_src_id = ATOM_TRANSMITTER_CONFIG_V5_P1PLL;
172*b843c749SSergey Zigachev 		break;
173*b843c749SSergey Zigachev 	}
174*b843c749SSergey Zigachev 
175*b843c749SSergey Zigachev 	return atom_phy_clk_src_id >> 2;
176*b843c749SSergey Zigachev }
177*b843c749SSergey Zigachev 
signal_type_to_atom_dig_mode(enum signal_type s)178*b843c749SSergey Zigachev static uint8_t signal_type_to_atom_dig_mode(enum signal_type s)
179*b843c749SSergey Zigachev {
180*b843c749SSergey Zigachev 	uint8_t atom_dig_mode = ATOM_TRANSMITTER_DIGMODE_V5_DP;
181*b843c749SSergey Zigachev 
182*b843c749SSergey Zigachev 	switch (s) {
183*b843c749SSergey Zigachev 	case SIGNAL_TYPE_DISPLAY_PORT:
184*b843c749SSergey Zigachev 	case SIGNAL_TYPE_EDP:
185*b843c749SSergey Zigachev 		atom_dig_mode = ATOM_TRANSMITTER_DIGMODE_V5_DP;
186*b843c749SSergey Zigachev 		break;
187*b843c749SSergey Zigachev 	case SIGNAL_TYPE_LVDS:
188*b843c749SSergey Zigachev 		atom_dig_mode = ATOM_TRANSMITTER_DIGMODE_V5_LVDS;
189*b843c749SSergey Zigachev 		break;
190*b843c749SSergey Zigachev 	case SIGNAL_TYPE_DVI_SINGLE_LINK:
191*b843c749SSergey Zigachev 	case SIGNAL_TYPE_DVI_DUAL_LINK:
192*b843c749SSergey Zigachev 		atom_dig_mode = ATOM_TRANSMITTER_DIGMODE_V5_DVI;
193*b843c749SSergey Zigachev 		break;
194*b843c749SSergey Zigachev 	case SIGNAL_TYPE_HDMI_TYPE_A:
195*b843c749SSergey Zigachev 		atom_dig_mode = ATOM_TRANSMITTER_DIGMODE_V5_HDMI;
196*b843c749SSergey Zigachev 		break;
197*b843c749SSergey Zigachev 	case SIGNAL_TYPE_DISPLAY_PORT_MST:
198*b843c749SSergey Zigachev 		atom_dig_mode = ATOM_TRANSMITTER_DIGMODE_V5_DP_MST;
199*b843c749SSergey Zigachev 		break;
200*b843c749SSergey Zigachev 	default:
201*b843c749SSergey Zigachev 		atom_dig_mode = ATOM_TRANSMITTER_DIGMODE_V5_DVI;
202*b843c749SSergey Zigachev 		break;
203*b843c749SSergey Zigachev 	}
204*b843c749SSergey Zigachev 
205*b843c749SSergey Zigachev 	return atom_dig_mode;
206*b843c749SSergey Zigachev }
207*b843c749SSergey Zigachev 
hpd_sel_to_atom(enum hpd_source_id id)208*b843c749SSergey Zigachev static uint8_t hpd_sel_to_atom(enum hpd_source_id id)
209*b843c749SSergey Zigachev {
210*b843c749SSergey Zigachev 	uint8_t atom_hpd_sel = 0;
211*b843c749SSergey Zigachev 
212*b843c749SSergey Zigachev 	switch (id) {
213*b843c749SSergey Zigachev 	case HPD_SOURCEID1:
214*b843c749SSergey Zigachev 		atom_hpd_sel = ATOM_TRANSMITTER_CONFIG_V5_HPD1_SEL;
215*b843c749SSergey Zigachev 		break;
216*b843c749SSergey Zigachev 	case HPD_SOURCEID2:
217*b843c749SSergey Zigachev 		atom_hpd_sel = ATOM_TRANSMITTER_CONFIG_V5_HPD2_SEL;
218*b843c749SSergey Zigachev 		break;
219*b843c749SSergey Zigachev 	case HPD_SOURCEID3:
220*b843c749SSergey Zigachev 		atom_hpd_sel = ATOM_TRANSMITTER_CONFIG_V5_HPD3_SEL;
221*b843c749SSergey Zigachev 		break;
222*b843c749SSergey Zigachev 	case HPD_SOURCEID4:
223*b843c749SSergey Zigachev 		atom_hpd_sel = ATOM_TRANSMITTER_CONFIG_V5_HPD4_SEL;
224*b843c749SSergey Zigachev 		break;
225*b843c749SSergey Zigachev 	case HPD_SOURCEID5:
226*b843c749SSergey Zigachev 		atom_hpd_sel = ATOM_TRANSMITTER_CONFIG_V5_HPD5_SEL;
227*b843c749SSergey Zigachev 		break;
228*b843c749SSergey Zigachev 	case HPD_SOURCEID6:
229*b843c749SSergey Zigachev 		atom_hpd_sel = ATOM_TRANSMITTER_CONFIG_V5_HPD6_SEL;
230*b843c749SSergey Zigachev 		break;
231*b843c749SSergey Zigachev 	case HPD_SOURCEID_UNKNOWN:
232*b843c749SSergey Zigachev 	default:
233*b843c749SSergey Zigachev 		atom_hpd_sel = 0;
234*b843c749SSergey Zigachev 		break;
235*b843c749SSergey Zigachev 	}
236*b843c749SSergey Zigachev 	return atom_hpd_sel >> 4;
237*b843c749SSergey Zigachev }
238*b843c749SSergey Zigachev 
dig_encoder_sel_to_atom(enum engine_id id)239*b843c749SSergey Zigachev static uint8_t dig_encoder_sel_to_atom(enum engine_id id)
240*b843c749SSergey Zigachev {
241*b843c749SSergey Zigachev 	uint8_t atom_dig_encoder_sel = 0;
242*b843c749SSergey Zigachev 
243*b843c749SSergey Zigachev 	switch (id) {
244*b843c749SSergey Zigachev 	case ENGINE_ID_DIGA:
245*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGA_SEL;
246*b843c749SSergey Zigachev 		break;
247*b843c749SSergey Zigachev 	case ENGINE_ID_DIGB:
248*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGB_SEL;
249*b843c749SSergey Zigachev 		break;
250*b843c749SSergey Zigachev 	case ENGINE_ID_DIGC:
251*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGC_SEL;
252*b843c749SSergey Zigachev 		break;
253*b843c749SSergey Zigachev 	case ENGINE_ID_DIGD:
254*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGD_SEL;
255*b843c749SSergey Zigachev 		break;
256*b843c749SSergey Zigachev 	case ENGINE_ID_DIGE:
257*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGE_SEL;
258*b843c749SSergey Zigachev 		break;
259*b843c749SSergey Zigachev 	case ENGINE_ID_DIGF:
260*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGF_SEL;
261*b843c749SSergey Zigachev 		break;
262*b843c749SSergey Zigachev 	case ENGINE_ID_DIGG:
263*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGG_SEL;
264*b843c749SSergey Zigachev 		break;
265*b843c749SSergey Zigachev 	default:
266*b843c749SSergey Zigachev 		atom_dig_encoder_sel = ATOM_TRANMSITTER_V5__DIGA_SEL;
267*b843c749SSergey Zigachev 		break;
268*b843c749SSergey Zigachev 	}
269*b843c749SSergey Zigachev 
270*b843c749SSergey Zigachev 	return atom_dig_encoder_sel;
271*b843c749SSergey Zigachev }
272*b843c749SSergey Zigachev 
phy_id_to_atom(enum transmitter t)273*b843c749SSergey Zigachev static uint8_t phy_id_to_atom(enum transmitter t)
274*b843c749SSergey Zigachev {
275*b843c749SSergey Zigachev 	uint8_t atom_phy_id;
276*b843c749SSergey Zigachev 
277*b843c749SSergey Zigachev 	switch (t) {
278*b843c749SSergey Zigachev 	case TRANSMITTER_UNIPHY_A:
279*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYA;
280*b843c749SSergey Zigachev 		break;
281*b843c749SSergey Zigachev 	case TRANSMITTER_UNIPHY_B:
282*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYB;
283*b843c749SSergey Zigachev 		break;
284*b843c749SSergey Zigachev 	case TRANSMITTER_UNIPHY_C:
285*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYC;
286*b843c749SSergey Zigachev 		break;
287*b843c749SSergey Zigachev 	case TRANSMITTER_UNIPHY_D:
288*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYD;
289*b843c749SSergey Zigachev 		break;
290*b843c749SSergey Zigachev 	case TRANSMITTER_UNIPHY_E:
291*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYE;
292*b843c749SSergey Zigachev 		break;
293*b843c749SSergey Zigachev 	case TRANSMITTER_UNIPHY_F:
294*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYF;
295*b843c749SSergey Zigachev 		break;
296*b843c749SSergey Zigachev 	case TRANSMITTER_UNIPHY_G:
297*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYG;
298*b843c749SSergey Zigachev 		break;
299*b843c749SSergey Zigachev 	default:
300*b843c749SSergey Zigachev 		atom_phy_id = ATOM_PHY_ID_UNIPHYA;
301*b843c749SSergey Zigachev 		break;
302*b843c749SSergey Zigachev 	}
303*b843c749SSergey Zigachev 	return atom_phy_id;
304*b843c749SSergey Zigachev }
305*b843c749SSergey Zigachev 
disp_power_gating_action_to_atom(enum bp_pipe_control_action action)306*b843c749SSergey Zigachev static uint8_t disp_power_gating_action_to_atom(
307*b843c749SSergey Zigachev 	enum bp_pipe_control_action action)
308*b843c749SSergey Zigachev {
309*b843c749SSergey Zigachev 	uint8_t atom_pipe_action = 0;
310*b843c749SSergey Zigachev 
311*b843c749SSergey Zigachev 	switch (action) {
312*b843c749SSergey Zigachev 	case ASIC_PIPE_DISABLE:
313*b843c749SSergey Zigachev 		atom_pipe_action = ATOM_DISABLE;
314*b843c749SSergey Zigachev 		break;
315*b843c749SSergey Zigachev 	case ASIC_PIPE_ENABLE:
316*b843c749SSergey Zigachev 		atom_pipe_action = ATOM_ENABLE;
317*b843c749SSergey Zigachev 		break;
318*b843c749SSergey Zigachev 	case ASIC_PIPE_INIT:
319*b843c749SSergey Zigachev 		atom_pipe_action = ATOM_INIT;
320*b843c749SSergey Zigachev 		break;
321*b843c749SSergey Zigachev 	default:
322*b843c749SSergey Zigachev 		BREAK_TO_DEBUGGER(); /* Unhandle action in driver! */
323*b843c749SSergey Zigachev 		break;
324*b843c749SSergey Zigachev 	}
325*b843c749SSergey Zigachev 
326*b843c749SSergey Zigachev 	return atom_pipe_action;
327*b843c749SSergey Zigachev }
328*b843c749SSergey Zigachev 
329*b843c749SSergey Zigachev static const struct command_table_helper command_table_helper_funcs = {
330*b843c749SSergey Zigachev 	.controller_id_to_atom = dal_cmd_table_helper_controller_id_to_atom,
331*b843c749SSergey Zigachev 	.encoder_action_to_atom = encoder_action_to_atom,
332*b843c749SSergey Zigachev 	.engine_bp_to_atom = engine_bp_to_atom,
333*b843c749SSergey Zigachev 	.clock_source_id_to_atom = clock_source_id_to_atom,
334*b843c749SSergey Zigachev 	.clock_source_id_to_atom_phy_clk_src_id =
335*b843c749SSergey Zigachev 		clock_source_id_to_atom_phy_clk_src_id,
336*b843c749SSergey Zigachev 	.signal_type_to_atom_dig_mode = signal_type_to_atom_dig_mode,
337*b843c749SSergey Zigachev 	.hpd_sel_to_atom = hpd_sel_to_atom,
338*b843c749SSergey Zigachev 	.dig_encoder_sel_to_atom = dig_encoder_sel_to_atom,
339*b843c749SSergey Zigachev 	.phy_id_to_atom = phy_id_to_atom,
340*b843c749SSergey Zigachev 	.disp_power_gating_action_to_atom = disp_power_gating_action_to_atom,
341*b843c749SSergey Zigachev 	.assign_control_parameter =
342*b843c749SSergey Zigachev 		dal_cmd_table_helper_assign_control_parameter,
343*b843c749SSergey Zigachev 	.clock_source_id_to_ref_clk_src =
344*b843c749SSergey Zigachev 		dal_cmd_table_helper_clock_source_id_to_ref_clk_src,
345*b843c749SSergey Zigachev 	.transmitter_bp_to_atom = dal_cmd_table_helper_transmitter_bp_to_atom,
346*b843c749SSergey Zigachev 	.encoder_id_to_atom = dal_cmd_table_helper_encoder_id_to_atom,
347*b843c749SSergey Zigachev 	.encoder_mode_bp_to_atom =
348*b843c749SSergey Zigachev 		dal_cmd_table_helper_encoder_mode_bp_to_atom,
349*b843c749SSergey Zigachev };
350*b843c749SSergey Zigachev 
dal_cmd_tbl_helper_dce80_get_table(void)351*b843c749SSergey Zigachev const struct command_table_helper *dal_cmd_tbl_helper_dce80_get_table(void)
352*b843c749SSergey Zigachev {
353*b843c749SSergey Zigachev 	return &command_table_helper_funcs;
354*b843c749SSergey Zigachev }
355