[AMD Public Use]

Series is:
Reviewed-by: Alex Deucher <[email protected]>
________________________________
From: Quan, Evan <[email protected]>
Sent: Friday, June 5, 2020 2:07 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Quan, Evan 
<[email protected]>
Subject: [PATCH 4/4] drm/amd/powerplay: use the same interval as PMFW on 
retrieving metrics table

Current 100ms interval makes no sense. User gets outdated
data due to this.

Change-Id: Ie1d950285460443d493f1647463b68cbe4a5ec67
Signed-off-by: Evan Quan <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c         | 2 +-
 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c 
b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 25653f5f8d16..4cfb1efbc541 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -571,7 +571,7 @@ static int navi10_get_smu_metrics_data(struct smu_context 
*smu,

         mutex_lock(&smu->metrics_lock);
         if (!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_update_table(smu,
                                        SMU_TABLE_SMU_METRICS,
                                        0,
diff --git a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c 
b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
index 13ec103575f9..78657696b427 100644
--- a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
@@ -557,7 +557,7 @@ static int sienna_cichlid_get_smu_metrics_data(struct 
smu_context *smu,

         mutex_lock(&smu->metrics_lock);
         if (!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_update_table(smu,
                                        SMU_TABLE_SMU_METRICS,
                                        0,
--
2.27.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to