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>
This commit is contained in:
@@ -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!");
|
||||||
|
|||||||
Reference in New Issue
Block a user