<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Prike Liang <Prike.Liang@amd.com><br>
<b>Sent:</b> Friday, June 14, 2019 3:01 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Liang, Prike; Huang, Ray; Feng, Kenneth; Quan, Evan<br>
<b>Subject:</b> [PATCH] drm/amd/powerplay: detect version of smu backend</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Change-Id: Ib050c8cf0c2c5af4c1f747cf596860f9be01a2d3<br>
Signed-off-by: Prike Liang <Prike.Liang@amd.com><br>
---<br>
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c             | 1 +<br>
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h               | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c        | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c      | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c   | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c     | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c      | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c     | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c    | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c    | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c    | 1 +<br>
 drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c     | 1 +<br>
 13 files changed, 13 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
index f1d326c..b996819 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
@@ -194,6 +194,7 @@ int hwmgr_sw_init(struct pp_hwmgr *hwmgr)<br>
                 return -EINVAL;<br>
 <br>
         phm_register_irq_handlers(hwmgr);<br>
+       pr_info("hwmgr_sw_init smu backed is %s\n",hwmgr->smumgr_funcs->name);<br>
 <br>
         return hwmgr->smumgr_funcs->smu_init(hwmgr);<br>
 }<br>
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h<br>
index c92999a..47dbecc 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h<br>
+++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h<br>
@@ -190,6 +190,7 @@ struct phm_vce_clock_voltage_dependency_table {<br>
 };<br>
 <br>
 struct pp_smumgr_func {<br>
+       char *name;<br>
         int (*smu_init)(struct pp_hwmgr  *hwmgr);<br>
         int (*smu_fini)(struct pp_hwmgr  *hwmgr);<br>
         int (*start_smu)(struct pp_hwmgr  *hwmgr);<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c<br>
index 9ef57fc..022f3c8 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c<br>
@@ -2935,6 +2935,7 @@ static int ci_update_smc_table(struct pp_hwmgr *hwmgr, uint32_t type)<br>
 }<br>
 <br>
 const struct pp_smumgr_func ci_smu_funcs = {<br>
+       .name = "ci_smu",<br>
         .smu_init = ci_smu_init,<br>
         .smu_fini = ci_smu_fini,<br>
         .start_smu = ci_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c<br>
index 0ce85b7..da025b1 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c<br>
@@ -2643,6 +2643,7 @@ static int fiji_update_dpm_settings(struct pp_hwmgr *hwmgr,<br>
 }<br>
 <br>
 const struct pp_smumgr_func fiji_smu_funcs = {<br>
+       .name = "fiji_smu",<br>
         .smu_init = &fiji_smu_init,<br>
         .smu_fini = &smu7_smu_fini,<br>
         .start_smu = &fiji_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c<br>
index f24f13d..f414f22 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c<br>
@@ -2661,6 +2661,7 @@ static bool iceland_is_dpm_running(struct pp_hwmgr *hwmgr)<br>
 }<br>
 <br>
 const struct pp_smumgr_func iceland_smu_funcs = {<br>
+       .name = "iceland_smu",<br>
         .smu_init = &iceland_smu_init,<br>
         .smu_fini = &smu7_smu_fini,<br>
         .start_smu = &iceland_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
index 0d8958e..fbac2d3 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
@@ -2550,6 +2550,7 @@ static int polaris10_update_dpm_settings(struct pp_hwmgr *hwmgr,<br>
 }<br>
 <br>
 const struct pp_smumgr_func polaris10_smu_funcs = {<br>
+       .name = "polaris10_smu",<br>
         .smu_init = polaris10_smu_init,<br>
         .smu_fini = smu7_smu_fini,<br>
         .start_smu = polaris10_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c<br>
index 6d11076a..ca66035 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c<br>
@@ -291,6 +291,7 @@ static int smu10_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint1<br>
 <br>
 <br>
 const struct pp_smumgr_func smu10_smu_funcs = {<br>
+       .name = "smu10_smu",<br>
         .smu_init = &smu10_smu_init,<br>
         .smu_fini = &smu10_smu_fini,<br>
         .start_smu = &smu10_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c<br>
index e2787e1..8189fe4 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c<br>
@@ -881,6 +881,7 @@ static bool smu8_is_dpm_running(struct pp_hwmgr *hwmgr)<br>
 }<br>
 <br>
 const struct pp_smumgr_func smu8_smu_funcs = {<br>
+       .name = "smu8_smu",<br>
         .smu_init = smu8_smu_init,<br>
         .smu_fini = smu8_smu_fini,<br>
         .start_smu = smu8_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c<br>
index 060c0f7..be5b7df 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c<br>
@@ -3240,6 +3240,7 @@ static int tonga_update_dpm_settings(struct pp_hwmgr *hwmgr,<br>
 }<br>
 <br>
 const struct pp_smumgr_func tonga_smu_funcs = {<br>
+       .name = "tonga_smu",<br>
         .smu_init = &tonga_smu_init,<br>
         .smu_fini = &smu7_smu_fini,<br>
         .start_smu = &tonga_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c<br>
index c81acc3..7bfef8d 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c<br>
@@ -346,6 +346,7 @@ static int vega10_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table,<br>
 }<br>
 <br>
 const struct pp_smumgr_func vega10_smu_funcs = {<br>
+       .name = "vega10_smu",<br>
         .smu_init = &vega10_smu_init,<br>
         .smu_fini = &vega10_smu_fini,<br>
         .start_smu = &vega10_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c<br>
index 1eaf0fa..9ad07a91c 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c<br>
@@ -386,6 +386,7 @@ static int vega12_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table,<br>
 }<br>
 <br>
 const struct pp_smumgr_func vega12_smu_funcs = {<br>
+       .name ="vega12_smu",<br>
         .smu_init = &vega12_smu_init,<br>
         .smu_fini = &vega12_smu_fini,<br>
         .start_smu = &vega12_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c<br>
index f301a73..957446c 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c<br>
@@ -592,6 +592,7 @@ static int vega20_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table,<br>
 }<br>
 <br>
 const struct pp_smumgr_func vega20_smu_funcs = {<br>
+       .name = "vega20_smu",<br>
         .smu_init = &vega20_smu_init,<br>
         .smu_fini = &vega20_smu_fini,<br>
         .start_smu = &vega20_start_smu,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c<br>
index d499204..7c960b0 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c<br>
@@ -2279,6 +2279,7 @@ static int vegam_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)<br>
 }<br>
 <br>
 const struct pp_smumgr_func vegam_smu_funcs = {<br>
+       .name = "vegam_smu",<br>
         .smu_init = vegam_smu_init,<br>
         .smu_fini = smu7_smu_fini,<br>
         .start_smu = vegam_start_smu,<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></div>
</span></font></div>
</body>
</html>