[PATCH 2/2] drm/amd/pm: prevent skipping the workload setting back to bootup default
Wang, Yang(Kevin)
KevinYang.Wang at amd.com
Tue Mar 11 09:24:32 UTC 2025
[AMD Official Use Only - AMD Internal Distribution Only]
Please add following information into commit message.
Fixes: bd3c9d1cde0c ("drm/amd/pm: fix and simplify workload handling”)
Series is
Reviewed-by: Yang Wang <kevinyang.wang at amd.com>
Best Regards,
Kevin
-----Original Message-----
From: Kenneth Feng <kenneth.feng at amd.com>
Sent: Tuesday, March 11, 2025 16:55
To: amd-gfx at lists.freedesktop.org
Cc: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Feng, Kenneth <Kenneth.Feng at amd.com>
Subject: [PATCH 2/2] drm/amd/pm: prevent skipping the workload setting back to bootup default
This is a bug fix. The scenario is that the same client can add the certain workload type refcount multiple times. Then the same client can not remove this setting when it wants to get back to the default bootup workload.
Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 8cfb07549f54..592bf54015c6 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2273,7 +2273,8 @@ static int smu_bump_power_profile_mode(struct smu_context *smu, static void smu_power_profile_mode_get(struct smu_context *smu,
enum PP_SMC_POWER_PROFILE profile_mode) {
- smu->workload_refcount[profile_mode]++;
+ if (!smu->workload_refcount[profile_mode])
+ smu->workload_refcount[profile_mode]++;
}
static void smu_power_profile_mode_put(struct smu_context *smu,
--
2.34.1
More information about the amd-gfx
mailing list