.. | .. |
---|
150 | 150 | |
---|
151 | 151 | static uint8_t dig_encoder_sel_to_atom(enum engine_id id) |
---|
152 | 152 | { |
---|
153 | | - uint8_t atom_dig_encoder_sel = 0; |
---|
154 | | - |
---|
155 | | - switch (id) { |
---|
156 | | - case ENGINE_ID_DIGA: |
---|
157 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGA_SEL; |
---|
158 | | - break; |
---|
159 | | - case ENGINE_ID_DIGB: |
---|
160 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGB_SEL; |
---|
161 | | - break; |
---|
162 | | - case ENGINE_ID_DIGC: |
---|
163 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGC_SEL; |
---|
164 | | - break; |
---|
165 | | - case ENGINE_ID_DIGD: |
---|
166 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGD_SEL; |
---|
167 | | - break; |
---|
168 | | - case ENGINE_ID_DIGE: |
---|
169 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGE_SEL; |
---|
170 | | - break; |
---|
171 | | - case ENGINE_ID_DIGF: |
---|
172 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGF_SEL; |
---|
173 | | - break; |
---|
174 | | - case ENGINE_ID_DIGG: |
---|
175 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGG_SEL; |
---|
176 | | - break; |
---|
177 | | - case ENGINE_ID_UNKNOWN: |
---|
178 | | - /* No DIG_FRONT is associated to DIG_BACKEND */ |
---|
179 | | - atom_dig_encoder_sel = 0; |
---|
180 | | - break; |
---|
181 | | - default: |
---|
182 | | - atom_dig_encoder_sel = ATOM_TRANMSITTER_V6__DIGA_SEL; |
---|
183 | | - break; |
---|
184 | | - } |
---|
| 153 | + /* On any ASIC after DCE80, we manually program the DIG_FE |
---|
| 154 | + * selection (see connect_dig_be_to_fe function of the link |
---|
| 155 | + * encoder), so translation should always return 0 (no FE). |
---|
| 156 | + */ |
---|
185 | 157 | |
---|
186 | 158 | return 0; |
---|
187 | 159 | } |
---|
.. | .. |
---|
416 | 388 | { |
---|
417 | 389 | return &command_table_helper_funcs; |
---|
418 | 390 | } |
---|
| 391 | + |
---|
| 392 | +#if defined(CONFIG_DRM_AMD_DC_DCN3_0) |
---|
| 393 | +/* function table */ |
---|
| 394 | +static const struct command_table_helper command_table_helper_funcs_dcn2x = { |
---|
| 395 | + .controller_id_to_atom = dal_cmd_table_helper_controller_id_to_atom2, |
---|
| 396 | + .encoder_action_to_atom = encoder_action_to_atom, |
---|
| 397 | + .engine_bp_to_atom = engine_bp_to_atom, |
---|
| 398 | + .clock_source_id_to_atom = clock_source_id_to_atom, |
---|
| 399 | + .clock_source_id_to_atom_phy_clk_src_id = |
---|
| 400 | + clock_source_id_to_atom_phy_clk_src_id, |
---|
| 401 | + .signal_type_to_atom_dig_mode = signal_type_to_atom_dig_mode, |
---|
| 402 | + .hpd_sel_to_atom = hpd_sel_to_atom, |
---|
| 403 | + .dig_encoder_sel_to_atom = dig_encoder_sel_to_atom, |
---|
| 404 | + .phy_id_to_atom = phy_id_to_atom, |
---|
| 405 | + .disp_power_gating_action_to_atom = disp_power_gating_action_to_atom, |
---|
| 406 | + .clock_source_id_to_ref_clk_src = NULL, |
---|
| 407 | + .transmitter_bp_to_atom = NULL, |
---|
| 408 | + .encoder_id_to_atom = dal_cmd_table_helper_encoder_id_to_atom2, |
---|
| 409 | + .encoder_mode_bp_to_atom = |
---|
| 410 | + dal_cmd_table_helper_encoder_mode_bp_to_atom2, |
---|
| 411 | + .dc_clock_type_to_atom = dc_clock_type_to_atom, |
---|
| 412 | + .transmitter_color_depth_to_atom = transmitter_color_depth_to_atom, |
---|
| 413 | + |
---|
| 414 | +}; |
---|
| 415 | + |
---|
| 416 | +/* |
---|
| 417 | + * dal_cmd_tbl_helper_dce110_get_table |
---|
| 418 | + * |
---|
| 419 | + * @brief |
---|
| 420 | + * Initialize command table helper functions |
---|
| 421 | + * |
---|
| 422 | + * @param |
---|
| 423 | + * const struct command_table_helper **h - [out] struct of functions |
---|
| 424 | + * |
---|
| 425 | + */ |
---|
| 426 | +const struct command_table_helper *dal_cmd_tbl_helper_dcn2_get_table2(void) |
---|
| 427 | +{ |
---|
| 428 | + return &command_table_helper_funcs_dcn2x; |
---|
| 429 | +} |
---|
| 430 | +#endif |
---|