drm/amd/powerplay: fix amdgpu_pm_info show gpu load error
authorKevin Wang <kevin1.wang@amd.com>
Fri, 10 May 2019 07:29:11 +0000 (15:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Jun 2019 23:59:30 +0000 (18:59 -0500)
due to the smu dma/RTOS restriction, the interval of catching smu
metric table should be more than 1ms. otherwise it will cause the gpu
activity data corruption.

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>
drivers/gpu/drm/amd/powerplay/navi10_ppt.c

index f9bfcaa73f7e5a81fa9c4204efd37f8819bed5cb..027742e173006a146447c115270ef4f3b3386d09 100644 (file)
@@ -816,6 +816,8 @@ static int navi10_get_current_activity_percent(struct smu_context *smu,
        if (!value)
                return -EINVAL;
 
+       msleep(1);
+
        ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS,
                               (void *)&metrics, false);
        if (ret)