summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorNirmoy Das <nirmoy.das@amd.com>2020-06-23 11:34:51 +0200
committerAlex Deucher <alexander.deucher@amd.com>2020-07-01 01:59:26 -0400
commit9d09fa6f71946a9a3988cd9354ea8890645deb84 (patch)
treeccec591b6c54839a748258380a8a88e015f1d45b /drivers/gpu/drm
parentc0732ba1eeec7fe6ea53c949d5ec6f79d56282c7 (diff)
drm/amd/powerplay: return current DCEFCLK on sysfs read (v2)
This fixes incorrect output when reading pp_dpm_dcefclk sysfs. Output before this patch: cat /sys/devices/pci0000:<snip>/pp_dpm_dcefclk 0: 506Mhz 1: 42949671Mhz * 2: 1266Mhz v2: squash in arcturus fix Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/powerplay/navi10_ppt.c3
-rw-r--r--drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 6c2f582bad5d..42ade9df0d6a 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -613,6 +613,9 @@ static int navi10_get_smu_metrics_data(struct smu_context *smu,
case METRICS_CURR_DCLK:
*value = metrics->CurrClock[PPCLK_DCLK];
break;
+ case METRICS_CURR_DCEFCLK:
+ *value = metrics->CurrClock[PPCLK_DCEFCLK];
+ break;
case METRICS_AVERAGE_GFXCLK:
*value = metrics->AverageGfxclkFrequency;
break;
diff --git a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
index 0957957a2cf5..1378dabb6463 100644
--- a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
@@ -605,6 +605,9 @@ static int sienna_cichlid_get_smu_metrics_data(struct smu_context *smu,
case METRICS_CURR_DCLK1:
*value = metrics->CurrClock[PPCLK_DCLK_1];
break;
+ case METRICS_CURR_DCEFCLK:
+ *value = metrics->CurrClock[PPCLK_DCEFCLK];
+ break;
case METRICS_AVERAGE_GFXCLK:
*value = metrics->AverageGfxclkFrequency;
break;