#define SWSMU_CODE_LAYER_L2
#include "amdgpu.h"
#include "amdgpu_smu.h"
#include "smu_v13_0.h"
#include "smu13_driver_if_v13_0_5.h"
#include "smu_v13_0_5_ppt.h"
#include "smu_v13_0_5_ppsmc.h"
#include "smu_v13_0_5_pmfw.h"
#include "smu_cmn.h"
#undef pr_err
#undef pr_warn
#undef pr_info
#undef pr_debug
#define mmMP1_C2PMSG_2 …
#define mmMP1_C2PMSG_2_BASE_IDX …
#define mmMP1_C2PMSG_34 …
#define mmMP1_C2PMSG_34_BASE_IDX …
#define mmMP1_C2PMSG_33 …
#define mmMP1_C2PMSG_33_BASE_IDX …
#define FEATURE_MASK(feature) …
#define SMC_DPM_FEATURE …
static struct cmn2asic_msg_mapping smu_v13_0_5_message_map[SMU_MSG_MAX_COUNT] = …;
static struct cmn2asic_mapping smu_v13_0_5_feature_mask_map[SMU_FEATURE_COUNT] = …;
static struct cmn2asic_mapping smu_v13_0_5_table_map[SMU_TABLE_COUNT] = …;
static int smu_v13_0_5_init_smc_tables(struct smu_context *smu)
{ … }
static int smu_v13_0_5_fini_smc_tables(struct smu_context *smu)
{ … }
static int smu_v13_0_5_system_features_control(struct smu_context *smu, bool en)
{ … }
static int smu_v13_0_5_dpm_set_vcn_enable(struct smu_context *smu, bool enable)
{ … }
static int smu_v13_0_5_dpm_set_jpeg_enable(struct smu_context *smu, bool enable)
{ … }
static bool smu_v13_0_5_is_dpm_running(struct smu_context *smu)
{ … }
static int smu_v13_0_5_mode_reset(struct smu_context *smu, int type)
{ … }
static int smu_v13_0_5_mode2_reset(struct smu_context *smu)
{ … }
static int smu_v13_0_5_get_smu_metrics_data(struct smu_context *smu,
MetricsMember_t member,
uint32_t *value)
{ … }
static int smu_v13_0_5_read_sensor(struct smu_context *smu,
enum amd_pp_sensors sensor,
void *data, uint32_t *size)
{ … }
static int smu_v13_0_5_set_watermarks_table(struct smu_context *smu,
struct pp_smu_wm_range_sets *clock_ranges)
{ … }
static ssize_t smu_v13_0_5_get_gpu_metrics(struct smu_context *smu,
void **table)
{ … }
static int smu_v13_0_5_set_default_dpm_tables(struct smu_context *smu)
{ … }
static int smu_v13_0_5_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TABLE_COMMAND type,
long input[], uint32_t size)
{ … }
static int smu_v13_0_5_get_current_clk_freq(struct smu_context *smu,
enum smu_clk_type clk_type,
uint32_t *value)
{ … }
static int smu_v13_0_5_get_dpm_level_count(struct smu_context *smu,
enum smu_clk_type clk_type,
uint32_t *count)
{ … }
static int smu_v13_0_5_get_dpm_freq_by_index(struct smu_context *smu,
enum smu_clk_type clk_type,
uint32_t dpm_level,
uint32_t *freq)
{ … }
static bool smu_v13_0_5_clk_dpm_is_enabled(struct smu_context *smu,
enum smu_clk_type clk_type)
{ … }
static int smu_v13_0_5_get_dpm_ultimate_freq(struct smu_context *smu,
enum smu_clk_type clk_type,
uint32_t *min,
uint32_t *max)
{ … }
static int smu_v13_0_5_set_soft_freq_limited_range(struct smu_context *smu,
enum smu_clk_type clk_type,
uint32_t min,
uint32_t max)
{ … }
static int smu_v13_0_5_print_clk_levels(struct smu_context *smu,
enum smu_clk_type clk_type, char *buf)
{ … }
static int smu_v13_0_5_force_clk_levels(struct smu_context *smu,
enum smu_clk_type clk_type, uint32_t mask)
{ … }
static int smu_v13_0_5_get_dpm_profile_freq(struct smu_context *smu,
enum amd_dpm_forced_level level,
enum smu_clk_type clk_type,
uint32_t *min_clk,
uint32_t *max_clk)
{ … }
static int smu_v13_0_5_set_performance_level(struct smu_context *smu,
enum amd_dpm_forced_level level)
{ … }
static int smu_v13_0_5_set_fine_grain_gfx_freq_parameters(struct smu_context *smu)
{ … }
static const struct pptable_funcs smu_v13_0_5_ppt_funcs = …;
void smu_v13_0_5_set_ppt_funcs(struct smu_context *smu)
{ … }