RE: [PATCH 2/2] drm/amd/pm: prevent skipping the workload setting back to bootup default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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@xxxxxxx>

Best Regards,
Kevin
-----Original Message-----
From: Kenneth Feng <kenneth.feng@xxxxxxx>
Sent: Tuesday, March 11, 2025 16:55
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Feng, Kenneth <Kenneth.Feng@xxxxxxx>
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@xxxxxxx>
---
 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





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux