Commit debd629a authored by Lijo Lazar's avatar Lijo Lazar Committed by Alex Deucher

drm/amd/pm: Correct msg status check for powerlimit

Status 0 indicates success, fix the check before using PPTable limit
Signed-off-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>`
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6be64246
...@@ -1072,7 +1072,7 @@ static int aldebaran_get_power_limit(struct smu_context *smu) ...@@ -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); 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 */ /* the last hope to figure out the ppt limit */
if (!pptable) { if (!pptable) {
dev_err(smu->adev->dev, "Cannot get PPT limit due to pptable missing!"); dev_err(smu->adev->dev, "Cannot get PPT limit due to pptable missing!");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment