<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">
<p style="font-family:Arial;font-size:10pt;color:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<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> Quan, Evan <Evan.Quan@amd.com><br>
<b>Sent:</b> Monday, August 10, 2020 11:35 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH 1/2] drm/amd/powerplay: update the metrics table cache interval as 1ms</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">To make the setting same as Arcturus/Navi1x/Sienna_Cichlid.<br>
<br>
Change-Id: I7ea721bf5872023f1ab39c3827fb9c6fd05877cc<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +-<br>
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 2 +-<br>
 drivers/gpu/drm/amd/powerplay/renoir_ppt.c         | 2 +-<br>
 3 files changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
index c70c30175801..f0680dd58508 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
@@ -1272,7 +1272,7 @@ static int vega12_get_metrics_table(struct pp_hwmgr *hwmgr,<br>
 <br>
         if (bypass_cache ||<br>
             !data->metrics_time ||<br>
-           time_after(jiffies, data->metrics_time + HZ / 2)) {<br>
+           time_after(jiffies, data->metrics_time + msecs_to_jiffies(1))) {<br>
                 ret = smum_smc_table_manager(hwmgr,<br>
                                              (uint8_t *)(&data->metrics_table),<br>
                                              TABLE_SMU_METRICS,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c<br>
index c9f402edc0d6..da84012b7fd5 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c<br>
@@ -2082,7 +2082,7 @@ static int vega20_get_metrics_table(struct pp_hwmgr *hwmgr,<br>
 <br>
         if (bypass_cache ||<br>
             !data->metrics_time ||<br>
-           time_after(jiffies, data->metrics_time + HZ / 2)) {<br>
+           time_after(jiffies, data->metrics_time + msecs_to_jiffies(1))) {<br>
                 ret = smum_smc_table_manager(hwmgr,<br>
                                              (uint8_t *)(&data->metrics_table),<br>
                                              TABLE_SMU_METRICS,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c<br>
index 8a8e6033f71f..c50c4547fea9 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c<br>
@@ -139,7 +139,7 @@ static int renoir_get_metrics_table(struct smu_context *smu,<br>
 <br>
         if (bypass_cache ||<br>
             !smu_table->metrics_time ||<br>
-           time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(100))) {<br>
+           time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(1))) {<br>
                 ret = smu_cmn_update_table(smu, SMU_TABLE_SMU_METRICS, 0,<br>
                                 (void *)smu_table->metrics_table, false);<br>
                 if (ret) {<br>
-- <br>
2.28.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>