[PATCH 1/2] drm/amd/powerplay: update the metrics table cache interval as 1ms

Deucher, Alexander Alexander.Deucher at amd.com
Tue Aug 11 13:18:24 UTC 2020


[AMD Public Use]

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: Quan, Evan <Evan.Quan at amd.com>
Sent: Monday, August 10, 2020 11:35 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Quan, Evan <Evan.Quan at amd.com>
Subject: [PATCH 1/2] drm/amd/powerplay: update the metrics table cache interval as 1ms

To make the setting same as Arcturus/Navi1x/Sienna_Cichlid.

Change-Id: I7ea721bf5872023f1ab39c3827fb9c6fd05877cc
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 2 +-
 drivers/gpu/drm/amd/powerplay/renoir_ppt.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
index c70c30175801..f0680dd58508 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
@@ -1272,7 +1272,7 @@ static int vega12_get_metrics_table(struct pp_hwmgr *hwmgr,

         if (bypass_cache ||
             !data->metrics_time ||
-           time_after(jiffies, data->metrics_time + HZ / 2)) {
+           time_after(jiffies, data->metrics_time + msecs_to_jiffies(1))) {
                 ret = smum_smc_table_manager(hwmgr,
                                              (uint8_t *)(&data->metrics_table),
                                              TABLE_SMU_METRICS,
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
index c9f402edc0d6..da84012b7fd5 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
@@ -2082,7 +2082,7 @@ static int vega20_get_metrics_table(struct pp_hwmgr *hwmgr,

         if (bypass_cache ||
             !data->metrics_time ||
-           time_after(jiffies, data->metrics_time + HZ / 2)) {
+           time_after(jiffies, data->metrics_time + msecs_to_jiffies(1))) {
                 ret = smum_smc_table_manager(hwmgr,
                                              (uint8_t *)(&data->metrics_table),
                                              TABLE_SMU_METRICS,
diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
index 8a8e6033f71f..c50c4547fea9 100644
--- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
@@ -139,7 +139,7 @@ static int renoir_get_metrics_table(struct smu_context *smu,

         if (bypass_cache ||
             !smu_table->metrics_time ||
-           time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(100))) {
+           time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(1))) {
                 ret = smu_cmn_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
                                 (void *)smu_table->metrics_table, false);
                 if (ret) {
--
2.28.0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200811/ae8d366a/attachment.htm>


More information about the amd-gfx mailing list