#include "dm_services.h"
#include "amdgpu.h"
#include "atom.h"
#include "include/bios_parser_interface.h"
#include "command_table.h"
#include "command_table_helper.h"
#include "bios_parser_helper.h"
#include "bios_parser_types_internal.h"
#define EXEC_BIOS_CMD_TABLE(command, params) …
#define BIOS_CMD_TABLE_REVISION(command, frev, crev) …
#define BIOS_CMD_TABLE_PARA_REVISION(command) …
static void init_dig_encoder_control(struct bios_parser *bp);
static void init_transmitter_control(struct bios_parser *bp);
static void init_set_pixel_clock(struct bios_parser *bp);
static void init_enable_spread_spectrum_on_ppll(struct bios_parser *bp);
static void init_adjust_display_pll(struct bios_parser *bp);
static void init_dac_encoder_control(struct bios_parser *bp);
static void init_dac_output_control(struct bios_parser *bp);
static void init_set_crtc_timing(struct bios_parser *bp);
static void init_enable_crtc(struct bios_parser *bp);
static void init_enable_crtc_mem_req(struct bios_parser *bp);
static void init_external_encoder_control(struct bios_parser *bp);
static void init_enable_disp_power_gating(struct bios_parser *bp);
static void init_program_clock(struct bios_parser *bp);
static void init_set_dce_clock(struct bios_parser *bp);
void dal_bios_parser_init_cmd_tbl(struct bios_parser *bp)
{ … }
static uint32_t bios_cmd_table_para_revision(void *dev,
uint32_t index)
{ … }
static enum bp_result encoder_control_digx_v3(
struct bios_parser *bp,
struct bp_encoder_control *cntl);
static enum bp_result encoder_control_digx_v4(
struct bios_parser *bp,
struct bp_encoder_control *cntl);
static enum bp_result encoder_control_digx_v5(
struct bios_parser *bp,
struct bp_encoder_control *cntl);
static void init_encoder_control_dig_v1(struct bios_parser *bp);
static void init_dig_encoder_control(struct bios_parser *bp)
{ … }
static enum bp_result encoder_control_dig_v1(
struct bios_parser *bp,
struct bp_encoder_control *cntl);
static enum bp_result encoder_control_dig1_v1(
struct bios_parser *bp,
struct bp_encoder_control *cntl);
static enum bp_result encoder_control_dig2_v1(
struct bios_parser *bp,
struct bp_encoder_control *cntl);
static void init_encoder_control_dig_v1(struct bios_parser *bp)
{ … }
static enum bp_result encoder_control_dig_v1(
struct bios_parser *bp,
struct bp_encoder_control *cntl)
{ … }
static enum bp_result encoder_control_dig1_v1(
struct bios_parser *bp,
struct bp_encoder_control *cntl)
{ … }
static enum bp_result encoder_control_dig2_v1(
struct bios_parser *bp,
struct bp_encoder_control *cntl)
{ … }
static enum bp_result encoder_control_digx_v3(
struct bios_parser *bp,
struct bp_encoder_control *cntl)
{ … }
static enum bp_result encoder_control_digx_v4(
struct bios_parser *bp,
struct bp_encoder_control *cntl)
{ … }
static enum bp_result encoder_control_digx_v5(
struct bios_parser *bp,
struct bp_encoder_control *cntl)
{ … }
static enum bp_result transmitter_control_v2(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static enum bp_result transmitter_control_v3(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static enum bp_result transmitter_control_v4(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static enum bp_result transmitter_control_v1_5(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static enum bp_result transmitter_control_v1_6(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static void init_transmitter_control(struct bios_parser *bp)
{ … }
static enum bp_result transmitter_control_v2(
struct bios_parser *bp,
struct bp_transmitter_control *cntl)
{ … }
static enum bp_result transmitter_control_v3(
struct bios_parser *bp,
struct bp_transmitter_control *cntl)
{ … }
static enum bp_result transmitter_control_v4(
struct bios_parser *bp,
struct bp_transmitter_control *cntl)
{ … }
static enum bp_result transmitter_control_v1_5(
struct bios_parser *bp,
struct bp_transmitter_control *cntl)
{ … }
static enum bp_result transmitter_control_v1_6(
struct bios_parser *bp,
struct bp_transmitter_control *cntl)
{ … }
static enum bp_result set_pixel_clock_v3(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params);
static enum bp_result set_pixel_clock_v5(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params);
static enum bp_result set_pixel_clock_v6(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params);
static enum bp_result set_pixel_clock_v7(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params);
static void init_set_pixel_clock(struct bios_parser *bp)
{ … }
static enum bp_result set_pixel_clock_v3(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params)
{ … }
#ifndef SET_PIXEL_CLOCK_PS_ALLOCATION_V5
SET_PIXEL_CLOCK_PS_ALLOCATION_V5;
#endif
#ifndef SET_PIXEL_CLOCK_PS_ALLOCATION_V6
SET_PIXEL_CLOCK_PS_ALLOCATION_V6;
#endif
static enum bp_result set_pixel_clock_v5(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params)
{ … }
static enum bp_result set_pixel_clock_v6(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params)
{ … }
static enum bp_result set_pixel_clock_v7(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params)
{ … }
static enum bp_result enable_spread_spectrum_on_ppll_v1(
struct bios_parser *bp,
struct bp_spread_spectrum_parameters *bp_params,
bool enable);
static enum bp_result enable_spread_spectrum_on_ppll_v2(
struct bios_parser *bp,
struct bp_spread_spectrum_parameters *bp_params,
bool enable);
static enum bp_result enable_spread_spectrum_on_ppll_v3(
struct bios_parser *bp,
struct bp_spread_spectrum_parameters *bp_params,
bool enable);
static void init_enable_spread_spectrum_on_ppll(struct bios_parser *bp)
{ … }
static enum bp_result enable_spread_spectrum_on_ppll_v1(
struct bios_parser *bp,
struct bp_spread_spectrum_parameters *bp_params,
bool enable)
{ … }
static enum bp_result enable_spread_spectrum_on_ppll_v2(
struct bios_parser *bp,
struct bp_spread_spectrum_parameters *bp_params,
bool enable)
{ … }
static enum bp_result enable_spread_spectrum_on_ppll_v3(
struct bios_parser *bp,
struct bp_spread_spectrum_parameters *bp_params,
bool enable)
{ … }
static enum bp_result adjust_display_pll_v2(
struct bios_parser *bp,
struct bp_adjust_pixel_clock_parameters *bp_params);
static enum bp_result adjust_display_pll_v3(
struct bios_parser *bp,
struct bp_adjust_pixel_clock_parameters *bp_params);
static void init_adjust_display_pll(struct bios_parser *bp)
{ … }
static enum bp_result adjust_display_pll_v2(
struct bios_parser *bp,
struct bp_adjust_pixel_clock_parameters *bp_params)
{ … }
static enum bp_result adjust_display_pll_v3(
struct bios_parser *bp,
struct bp_adjust_pixel_clock_parameters *bp_params)
{ … }
static enum bp_result dac1_encoder_control_v1(
struct bios_parser *bp,
bool enable,
uint32_t pixel_clock,
uint8_t dac_standard);
static enum bp_result dac2_encoder_control_v1(
struct bios_parser *bp,
bool enable,
uint32_t pixel_clock,
uint8_t dac_standard);
static void init_dac_encoder_control(struct bios_parser *bp)
{ … }
static void dac_encoder_control_prepare_params(
DAC_ENCODER_CONTROL_PS_ALLOCATION *params,
bool enable,
uint32_t pixel_clock,
uint8_t dac_standard)
{ … }
static enum bp_result dac1_encoder_control_v1(
struct bios_parser *bp,
bool enable,
uint32_t pixel_clock,
uint8_t dac_standard)
{ … }
static enum bp_result dac2_encoder_control_v1(
struct bios_parser *bp,
bool enable,
uint32_t pixel_clock,
uint8_t dac_standard)
{ … }
static enum bp_result dac1_output_control_v1(
struct bios_parser *bp,
bool enable);
static enum bp_result dac2_output_control_v1(
struct bios_parser *bp,
bool enable);
static void init_dac_output_control(struct bios_parser *bp)
{ … }
static enum bp_result dac1_output_control_v1(
struct bios_parser *bp, bool enable)
{ … }
static enum bp_result dac2_output_control_v1(
struct bios_parser *bp, bool enable)
{ … }
static enum bp_result set_crtc_using_dtd_timing_v3(
struct bios_parser *bp,
struct bp_hw_crtc_timing_parameters *bp_params);
static enum bp_result set_crtc_timing_v1(
struct bios_parser *bp,
struct bp_hw_crtc_timing_parameters *bp_params);
static void init_set_crtc_timing(struct bios_parser *bp)
{ … }
static enum bp_result set_crtc_timing_v1(
struct bios_parser *bp,
struct bp_hw_crtc_timing_parameters *bp_params)
{ … }
static enum bp_result set_crtc_using_dtd_timing_v3(
struct bios_parser *bp,
struct bp_hw_crtc_timing_parameters *bp_params)
{ … }
static enum bp_result enable_crtc_v1(
struct bios_parser *bp,
enum controller_id controller_id,
bool enable);
static void init_enable_crtc(struct bios_parser *bp)
{ … }
static enum bp_result enable_crtc_v1(
struct bios_parser *bp,
enum controller_id controller_id,
bool enable)
{ … }
static enum bp_result enable_crtc_mem_req_v1(
struct bios_parser *bp,
enum controller_id controller_id,
bool enable);
static void init_enable_crtc_mem_req(struct bios_parser *bp)
{ … }
static enum bp_result enable_crtc_mem_req_v1(
struct bios_parser *bp,
enum controller_id controller_id,
bool enable)
{ … }
static enum bp_result program_clock_v5(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params);
static enum bp_result program_clock_v6(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params);
static void init_program_clock(struct bios_parser *bp)
{ … }
static enum bp_result program_clock_v5(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params)
{ … }
static enum bp_result program_clock_v6(
struct bios_parser *bp,
struct bp_pixel_clock_parameters *bp_params)
{ … }
static enum bp_result external_encoder_control_v3(
struct bios_parser *bp,
struct bp_external_encoder_control *cntl);
static void init_external_encoder_control(
struct bios_parser *bp)
{ … }
static enum bp_result external_encoder_control_v3(
struct bios_parser *bp,
struct bp_external_encoder_control *cntl)
{ … }
static enum bp_result enable_disp_power_gating_v2_1(
struct bios_parser *bp,
enum controller_id crtc_id,
enum bp_pipe_control_action action);
static void init_enable_disp_power_gating(
struct bios_parser *bp)
{ … }
static enum bp_result enable_disp_power_gating_v2_1(
struct bios_parser *bp,
enum controller_id crtc_id,
enum bp_pipe_control_action action)
{ … }
static enum bp_result set_dce_clock_v2_1(
struct bios_parser *bp,
struct bp_set_dce_clock_parameters *bp_params);
static void init_set_dce_clock(struct bios_parser *bp)
{ … }
static enum bp_result set_dce_clock_v2_1(
struct bios_parser *bp,
struct bp_set_dce_clock_parameters *bp_params)
{ … }