summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2024-03-08 13:24:40 +1000
committerDave Airlie <airlied@redhat.com>2024-03-08 13:24:45 +1000
commitb3cdb1928fa81c3e3d2111f9376c455958f86678 (patch)
tree587e1eead08d6852b89209a74b3047eeab9812df /drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
parent3a397b131d16305792dc940057e5df84a5b4247c (diff)
parent0dafaf659cc463f2db0af92003313a8bc46781cd (diff)
Merge tag 'amd-drm-fixes-6.8-2024-03-07' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.8-2024-03-07: amdgpu: - SMU14 fix - Fix possible NULL pointer - VRR fix - pwm fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240307143318.2869884-1-alexander.deucher@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
index 47fdbae4adfc..9310c4758e38 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
@@ -261,7 +261,10 @@ static int smu_v14_0_0_get_smu_metrics_data(struct smu_context *smu,
*value = metrics->MpipuclkFrequency;
break;
case METRICS_AVERAGE_GFXACTIVITY:
- *value = metrics->GfxActivity / 100;
+ if ((smu->smc_fw_version > 0x5d4600))
+ *value = metrics->GfxActivity;
+ else
+ *value = metrics->GfxActivity / 100;
break;
case METRICS_AVERAGE_VCNACTIVITY:
*value = metrics->VcnActivity / 100;