drm/amd/powerplay: use the same interval as PMFW on retrieving metrics table
authorEvan Quan <evan.quan@amd.com>
Thu, 4 Jun 2020 08:27:13 +0000 (16:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:17 +0000 (01:59 -0400)
Current 100ms interval makes no sense. User gets outdated
data due to this.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/navi10_ppt.c
drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c

index e823d40..1f1d3f7 100644 (file)
@@ -573,7 +573,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,
index a30793f..fd755af 100644 (file)
@@ -559,7 +559,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,