diff options
author | Lijo Lazar <[email protected]> | 2021-01-29 16:24:05 +0800 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2021-03-23 22:58:21 -0400 |
commit | debd629a633670527c78f33ab4774899795fc01e (patch) | |
tree | d9aad4a7b0225db699531c58280138ff7e30a5c7 | |
parent | 6be6424684cb464be65d47cd4158e811f0d75368 (diff) |
drm/amd/pm: Correct msg status check for powerlimit
Status 0 indicates success, fix the check before using PPTable limit
Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Evan Quan <[email protected]>
Reviewed-by: Kevin Wang <[email protected]>`
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 |
1 files changed, 1 insertions, 1 deletions
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!"); |