Skip to contentSkip to conversation

drm/amdgpu/powerplay: Target power profile mode should be the second parameter of renoir_set_power_profile_mode

PATCH In review chen gong 2 participants 2 messages Jul 10, 2020

Subsystems (2)
lore
Share & tools
lore

chen gong

author
#0 lore raw

PATCH 1/1 drm/amdgpu/powerplay: Target power profile mode should be the second parameter of renoir_set_power_profile_mode

A small mistake

---
 drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/renoir_ppt.c +3 -3
index f286c1e..ae87c46 100644
@@ -683,18 +683,18 @@ static int renoir_set_power_profile_mode(struct smu_context *smu, long *input, u
 	uint32_t profile_mode = input[size];
 
 	if (profile_mode > PP_SMC_POWER_PROFILE_CUSTOM) {
-		dev_err(smu->adev->dev, "Invalid power profile mode %d\n", smu->power_profile_mode);
+		dev_err(smu->adev->dev, "Invalid power profile mode %d\n", profile_mode);
 		return -EINVAL;
 	}
 
 	/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
-	workload_type = smu_workload_get_type(smu, smu->power_profile_mode);
+	workload_type = smu_workload_get_type(smu, profile_mode);
 	if (workload_type < 0) {
 		/*
 		 * TODO: If some case need switch to powersave/default power mode
 		 * then can consider enter WORKLOAD_COMPUTE/WORKLOAD_CUSTOM for power saving.
 		 */
-		dev_err_once(smu->adev->dev, "Unsupported power profile mode %d on RENOIR\n",smu->power_profile_mode);
+		dev_err_once(smu->adev->dev, "Unsupported power profile mode %d on RENOIR\n", profile_mode);
 		return -EINVAL;
 	}
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Acked-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: chen gong <[email protected]>
Sent: Friday, July 10, 2020 4:21 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>; Gong, Curry <[email protected]>
Subject: [PATCH] drm/amdgpu/powerplay: Target power profile mode should be the second parameter of renoir_set_power_profile_mode

A small mistake

---
 drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/renoir_ppt.c +3 -3
index f286c1e..ae87c46 100644
@@ -683,18 +683,18 @@ static int renoir_set_power_profile_mode(struct smu_context *smu, long *input, u
 uint32_t profile_mode = input[size];
 
 if (profile_mode > PP_SMC_POWER_PROFILE_CUSTOM) {
-dev_err(smu->adev->dev, "Invalid power profile mode %d\n", smu->power_profile_mode);
+dev_err(smu->adev->dev, "Invalid power profile mode %d\n", profile_mode);
 return -EINVAL;
 }
 
 /* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
-workload_type = smu_workload_get_type(smu, smu->power_profile_mode);
+workload_type = smu_workload_get_type(smu, profile_mode);
 if (workload_type < 0) {
 /*
  * TODO: If some case need switch to powersave/default power mode
  * then can consider enter WORKLOAD_COMPUTE/WORKLOAD_CUSTOM for power saving.
  */
-dev_err_once(smu->adev->dev, "Unsupported power profile mode %d on RENOIR\n",smu->power_profile_mode);
+dev_err_once(smu->adev->dev, "Unsupported power profile mode %d on RENOIR\n", profile_mode);
 return -EINVAL;
 }
 

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx