drm/amd/powerplay: detect version of smu backend (v2)
authorPrike Liang <Prike.Liang@amd.com>
Fri, 14 Jun 2019 04:06:35 +0000 (12:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 17 Jun 2019 16:02:03 +0000 (11:02 -0500)
Print the backend type.

v2: whitespace fixes (Alex)

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 files changed:
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c

index f1d326caf69e1b6378cb89ae701758f8bede5c0a..0b0d83c2a67822427e7ba0de42cc148e4ef53626 100644 (file)
@@ -194,6 +194,7 @@ int hwmgr_sw_init(struct pp_hwmgr *hwmgr)
                return -EINVAL;
 
        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);
 }
index c92999aac07c9984d39a8314be242d977606b439..47dbecca5adb0aa8630cd4fbb0fef70cf2191d0b 100644 (file)
@@ -190,6 +190,7 @@ struct phm_vce_clock_voltage_dependency_table {
 };
 
 struct pp_smumgr_func {
+       char *name;
        int (*smu_init)(struct pp_hwmgr  *hwmgr);
        int (*smu_fini)(struct pp_hwmgr  *hwmgr);
        int (*start_smu)(struct pp_hwmgr  *hwmgr);
index 9ef57fcf7e786eb39382174daadd58c88ca4de6a..022f3c8c04f81cd792ef98b655f9a6d753593769 100644 (file)
@@ -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 = {
+       .name = "ci_smu",
        .smu_init = ci_smu_init,
        .smu_fini = ci_smu_fini,
        .start_smu = ci_start_smu,
index 0ce85b73338ec7b5c9673504c5aeb43038d39283..da025b1d302dad7056e4b5398fcddbf21470ebfe 100644 (file)
@@ -2643,6 +2643,7 @@ static int fiji_update_dpm_settings(struct pp_hwmgr *hwmgr,
 }
 
 const struct pp_smumgr_func fiji_smu_funcs = {
+       .name = "fiji_smu",
        .smu_init = &fiji_smu_init,
        .smu_fini = &smu7_smu_fini,
        .start_smu = &fiji_start_smu,
index f24f13d77808568d8fb99b9cffb241405eae669f..f414f22c2245ed04ccc0edbc4249e349c6802086 100644 (file)
@@ -2661,6 +2661,7 @@ static bool iceland_is_dpm_running(struct pp_hwmgr *hwmgr)
 }
 
 const struct pp_smumgr_func iceland_smu_funcs = {
+       .name = "iceland_smu",
        .smu_init = &iceland_smu_init,
        .smu_fini = &smu7_smu_fini,
        .start_smu = &iceland_start_smu,
index 0d8958e71b94f8ef52afee87c7833f6136d3c0ce..fbac2d3326b55e7a78d0c3e84860688d85c488dc 100644 (file)
@@ -2550,6 +2550,7 @@ static int polaris10_update_dpm_settings(struct pp_hwmgr *hwmgr,
 }
 
 const struct pp_smumgr_func polaris10_smu_funcs = {
+       .name = "polaris10_smu",
        .smu_init = polaris10_smu_init,
        .smu_fini = smu7_smu_fini,
        .start_smu = polaris10_start_smu,
index 6d11076a79ba90d254deba415b48c6cc6eff9da9..ca660351a3637280b68c64e09b0318e7f4c1138c 100644 (file)
@@ -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 = {
+       .name = "smu10_smu",
        .smu_init = &smu10_smu_init,
        .smu_fini = &smu10_smu_fini,
        .start_smu = &smu10_start_smu,
index e2787e14a50086831f619427b070029e31dba0c6..8189fe402c6d3163585b5faf29e09e275d0773b8 100644 (file)
@@ -881,6 +881,7 @@ static bool smu8_is_dpm_running(struct pp_hwmgr *hwmgr)
 }
 
 const struct pp_smumgr_func smu8_smu_funcs = {
+       .name = "smu8_smu",
        .smu_init = smu8_smu_init,
        .smu_fini = smu8_smu_fini,
        .start_smu = smu8_start_smu,
index 060c0f7f523852991ea809b1d9a3a447c62db706..be5b7dfbe30e8dbffacc4a287cc6edf9b8d40941 100644 (file)
@@ -3240,6 +3240,7 @@ static int tonga_update_dpm_settings(struct pp_hwmgr *hwmgr,
 }
 
 const struct pp_smumgr_func tonga_smu_funcs = {
+       .name = "tonga_smu",
        .smu_init = &tonga_smu_init,
        .smu_fini = &smu7_smu_fini,
        .start_smu = &tonga_start_smu,
index c81acc3192ad2acc3b98bdfe6308f1a942862b5c..7bfef8d85cda9ebda1e83452f3a6f64192f8543e 100644 (file)
@@ -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 = {
+       .name = "vega10_smu",
        .smu_init = &vega10_smu_init,
        .smu_fini = &vega10_smu_fini,
        .start_smu = &vega10_start_smu,
index 1eaf0fa28ef77f4865de3f5f651b54eae26d4b84..bab3df85fdcd149a411e4f9ac5f30e04aaed5a16 100644 (file)
@@ -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 = {
+       .name = "vega12_smu",
        .smu_init = &vega12_smu_init,
        .smu_fini = &vega12_smu_fini,
        .start_smu = &vega12_start_smu,
index f301a73f6df1b9890926816f12eab57aa45c2713..957446cf467e242e6f23c0eb989db4d9ccb12d72 100644 (file)
@@ -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 = {
+       .name = "vega20_smu",
        .smu_init = &vega20_smu_init,
        .smu_fini = &vega20_smu_fini,
        .start_smu = &vega20_start_smu,
index d499204b2184508aa66f6d3e320bf535cb63b9e4..7c960b07746fd28da3f44920a65092f15c517848 100644 (file)
@@ -2279,6 +2279,7 @@ static int vegam_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 }
 
 const struct pp_smumgr_func vegam_smu_funcs = {
+       .name = "vegam_smu",
        .smu_init = vegam_smu_init,
        .smu_fini = smu7_smu_fini,
        .start_smu = vegam_start_smu,