diff options
author | Lijo Lazar <lijo.lazar@amd.com> | 2021-01-29 16:24:05 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-03-23 22:58:21 -0400 |
commit | debd629a633670527c78f33ab4774899795fc01e (patch) | |
tree | d9aad4a7b0225db699531c58280138ff7e30a5c7 /drivers/gpu/drm/amd | |
parent | 6be6424684cb464be65d47cd4158e811f0d75368 (diff) | |
download | linux-debd629a633670527c78f33ab4774899795fc01e.tar.bz2 |
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 <lijo.lazar@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>`
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-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!"); |