drm/amd/powerplay: change metrics update period from 1ms to 100ms
authorKevin Wang <kevin1.wang@amd.com>
Thu, 26 Sep 2019 08:16:41 +0000 (16:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Oct 2019 17:23:04 +0000 (12:23 -0500)
v2:
change period from 10ms to 100ms (typo error)

too high frequence to update mertrics table will cause smu firmware
error,so change mertrics table update period from 1ms to 100ms
(navi10, 12, 14)

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.3.x
drivers/gpu/drm/amd/powerplay/navi10_ppt.c

index 12c0e469bf351e34b4789c59790fa11699bb353f..2574f7186e169a71cfebdf79b636f9807630ebab 100644 (file)
@@ -547,7 +547,7 @@ static int navi10_get_metrics_table(struct smu_context *smu,
        struct smu_table_context *smu_table= &smu->smu_table;
        int ret = 0;
 
-       if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + HZ / 1000)) {
+       if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(100))) {
                ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
                                (void *)smu_table->metrics_table, false);
                if (ret) {