[PATCH 125/159] drm/amd/pm: Correct msg status check for powerlimit
Alex Deucher
alexander.deucher at amd.com
Wed Feb 24 22:18:25 UTC 2021
From: Lijo Lazar <lijo.lazar at amd.com>
Status 0 indicates success, fix the check before using PPTable limit
Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
Reviewed-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Kevin Wang <kevin1.wang at amd.com>`
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index 629523858660..df94604edd97 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -1072,7 +1072,7 @@ static int aldebaran_get_power_limit(struct smu_context *smu)
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_GetPptLimit, &power_limit);
- if (!ret) {
+ if (ret) {
/* the last hope to figure out the ppt limit */
if (!pptable) {
dev_err(smu->adev->dev, "Cannot get PPT limit due to pptable missing!");
--
2.29.2
More information about the amd-gfx
mailing list