drm/amd/powerplay: bug fix for sysfs
authorKenneth Feng <kenneth.feng@amd.com>
Thu, 11 Jul 2019 07:37:50 +0000 (15:37 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 11 Jul 2019 19:37:23 +0000 (14:37 -0500)
when we set profile_peak to sysfs:power_dpm_force_performance_level,
we gets the wrong socclk level and mclk level.this patch fix this issue.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/navi10_ppt.c

index 880fe0930d9e42dd26d61b7c38b3faee369b477f..4404528f969a60662bb014533c6f3b9527dc7f90 100644 (file)
@@ -1157,14 +1157,14 @@ static int navi10_get_profiling_clk_mask(struct smu_context *smu,
                        ret = smu_get_dpm_level_count(smu, SMU_MCLK, &level_count);
                        if (ret)
                                return ret;
-                       *sclk_mask = level_count - 1;
+                       *mclk_mask = level_count - 1;
                }
 
                if(soc_mask) {
                        ret = smu_get_dpm_level_count(smu, SMU_SOCCLK, &level_count);
                        if (ret)
                                return ret;
-                       *sclk_mask = level_count - 1;
+                       *soc_mask = level_count - 1;
                }
        }