Commit 82973e07 authored by Prike Liang's avatar Prike Liang Committed by Alex Deucher

drm/amd/powerplay: detect version of smu backend (v2)

Print the backend type.

v2: whitespace fixes (Alex)
Signed-off-by: default avatarPrike Liang <Prike.Liang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 38bb4226
...@@ -194,6 +194,7 @@ int hwmgr_sw_init(struct pp_hwmgr *hwmgr) ...@@ -194,6 +194,7 @@ int hwmgr_sw_init(struct pp_hwmgr *hwmgr)
return -EINVAL; return -EINVAL;
phm_register_irq_handlers(hwmgr); phm_register_irq_handlers(hwmgr);
pr_info("hwmgr_sw_init smu backed is %s\n", hwmgr->smumgr_funcs->name);
return hwmgr->smumgr_funcs->smu_init(hwmgr); return hwmgr->smumgr_funcs->smu_init(hwmgr);
} }
......
...@@ -190,6 +190,7 @@ struct phm_vce_clock_voltage_dependency_table { ...@@ -190,6 +190,7 @@ struct phm_vce_clock_voltage_dependency_table {
}; };
struct pp_smumgr_func { struct pp_smumgr_func {
char *name;
int (*smu_init)(struct pp_hwmgr *hwmgr); int (*smu_init)(struct pp_hwmgr *hwmgr);
int (*smu_fini)(struct pp_hwmgr *hwmgr); int (*smu_fini)(struct pp_hwmgr *hwmgr);
int (*start_smu)(struct pp_hwmgr *hwmgr); int (*start_smu)(struct pp_hwmgr *hwmgr);
......
...@@ -2935,6 +2935,7 @@ static int ci_update_smc_table(struct pp_hwmgr *hwmgr, uint32_t type) ...@@ -2935,6 +2935,7 @@ static int ci_update_smc_table(struct pp_hwmgr *hwmgr, uint32_t type)
} }
const struct pp_smumgr_func ci_smu_funcs = { const struct pp_smumgr_func ci_smu_funcs = {
.name = "ci_smu",
.smu_init = ci_smu_init, .smu_init = ci_smu_init,
.smu_fini = ci_smu_fini, .smu_fini = ci_smu_fini,
.start_smu = ci_start_smu, .start_smu = ci_start_smu,
......
...@@ -2643,6 +2643,7 @@ static int fiji_update_dpm_settings(struct pp_hwmgr *hwmgr, ...@@ -2643,6 +2643,7 @@ static int fiji_update_dpm_settings(struct pp_hwmgr *hwmgr,
} }
const struct pp_smumgr_func fiji_smu_funcs = { const struct pp_smumgr_func fiji_smu_funcs = {
.name = "fiji_smu",
.smu_init = &fiji_smu_init, .smu_init = &fiji_smu_init,
.smu_fini = &smu7_smu_fini, .smu_fini = &smu7_smu_fini,
.start_smu = &fiji_start_smu, .start_smu = &fiji_start_smu,
......
...@@ -2661,6 +2661,7 @@ static bool iceland_is_dpm_running(struct pp_hwmgr *hwmgr) ...@@ -2661,6 +2661,7 @@ static bool iceland_is_dpm_running(struct pp_hwmgr *hwmgr)
} }
const struct pp_smumgr_func iceland_smu_funcs = { const struct pp_smumgr_func iceland_smu_funcs = {
.name = "iceland_smu",
.smu_init = &iceland_smu_init, .smu_init = &iceland_smu_init,
.smu_fini = &smu7_smu_fini, .smu_fini = &smu7_smu_fini,
.start_smu = &iceland_start_smu, .start_smu = &iceland_start_smu,
......
...@@ -2550,6 +2550,7 @@ static int polaris10_update_dpm_settings(struct pp_hwmgr *hwmgr, ...@@ -2550,6 +2550,7 @@ static int polaris10_update_dpm_settings(struct pp_hwmgr *hwmgr,
} }
const struct pp_smumgr_func polaris10_smu_funcs = { const struct pp_smumgr_func polaris10_smu_funcs = {
.name = "polaris10_smu",
.smu_init = polaris10_smu_init, .smu_init = polaris10_smu_init,
.smu_fini = smu7_smu_fini, .smu_fini = smu7_smu_fini,
.start_smu = polaris10_start_smu, .start_smu = polaris10_start_smu,
......
...@@ -291,6 +291,7 @@ static int smu10_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint1 ...@@ -291,6 +291,7 @@ static int smu10_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint1
const struct pp_smumgr_func smu10_smu_funcs = { const struct pp_smumgr_func smu10_smu_funcs = {
.name = "smu10_smu",
.smu_init = &smu10_smu_init, .smu_init = &smu10_smu_init,
.smu_fini = &smu10_smu_fini, .smu_fini = &smu10_smu_fini,
.start_smu = &smu10_start_smu, .start_smu = &smu10_start_smu,
......
...@@ -881,6 +881,7 @@ static bool smu8_is_dpm_running(struct pp_hwmgr *hwmgr) ...@@ -881,6 +881,7 @@ static bool smu8_is_dpm_running(struct pp_hwmgr *hwmgr)
} }
const struct pp_smumgr_func smu8_smu_funcs = { const struct pp_smumgr_func smu8_smu_funcs = {
.name = "smu8_smu",
.smu_init = smu8_smu_init, .smu_init = smu8_smu_init,
.smu_fini = smu8_smu_fini, .smu_fini = smu8_smu_fini,
.start_smu = smu8_start_smu, .start_smu = smu8_start_smu,
......
...@@ -3240,6 +3240,7 @@ static int tonga_update_dpm_settings(struct pp_hwmgr *hwmgr, ...@@ -3240,6 +3240,7 @@ static int tonga_update_dpm_settings(struct pp_hwmgr *hwmgr,
} }
const struct pp_smumgr_func tonga_smu_funcs = { const struct pp_smumgr_func tonga_smu_funcs = {
.name = "tonga_smu",
.smu_init = &tonga_smu_init, .smu_init = &tonga_smu_init,
.smu_fini = &smu7_smu_fini, .smu_fini = &smu7_smu_fini,
.start_smu = &tonga_start_smu, .start_smu = &tonga_start_smu,
......
...@@ -346,6 +346,7 @@ static int vega10_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, ...@@ -346,6 +346,7 @@ static int vega10_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table,
} }
const struct pp_smumgr_func vega10_smu_funcs = { const struct pp_smumgr_func vega10_smu_funcs = {
.name = "vega10_smu",
.smu_init = &vega10_smu_init, .smu_init = &vega10_smu_init,
.smu_fini = &vega10_smu_fini, .smu_fini = &vega10_smu_fini,
.start_smu = &vega10_start_smu, .start_smu = &vega10_start_smu,
......
...@@ -386,6 +386,7 @@ static int vega12_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, ...@@ -386,6 +386,7 @@ static int vega12_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table,
} }
const struct pp_smumgr_func vega12_smu_funcs = { const struct pp_smumgr_func vega12_smu_funcs = {
.name = "vega12_smu",
.smu_init = &vega12_smu_init, .smu_init = &vega12_smu_init,
.smu_fini = &vega12_smu_fini, .smu_fini = &vega12_smu_fini,
.start_smu = &vega12_start_smu, .start_smu = &vega12_start_smu,
......
...@@ -592,6 +592,7 @@ static int vega20_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, ...@@ -592,6 +592,7 @@ static int vega20_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table,
} }
const struct pp_smumgr_func vega20_smu_funcs = { const struct pp_smumgr_func vega20_smu_funcs = {
.name = "vega20_smu",
.smu_init = &vega20_smu_init, .smu_init = &vega20_smu_init,
.smu_fini = &vega20_smu_fini, .smu_fini = &vega20_smu_fini,
.start_smu = &vega20_start_smu, .start_smu = &vega20_start_smu,
......
...@@ -2279,6 +2279,7 @@ static int vegam_thermal_setup_fan_table(struct pp_hwmgr *hwmgr) ...@@ -2279,6 +2279,7 @@ static int vegam_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
} }
const struct pp_smumgr_func vegam_smu_funcs = { const struct pp_smumgr_func vegam_smu_funcs = {
.name = "vegam_smu",
.smu_init = vegam_smu_init, .smu_init = vegam_smu_init,
.smu_fini = smu7_smu_fini, .smu_fini = smu7_smu_fini,
.start_smu = vegam_start_smu, .start_smu = vegam_start_smu,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment