drm/amd/pm: check the return of send smc msg for sienna_cichild
authorJesse Zhang <jesse.zhang@amd.com>
Wed, 8 May 2024 09:32:32 +0000 (17:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 May 2024 20:11:53 +0000 (16:11 -0400)
Set smu work laod mask may fail, so check return.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c

index d5a21d7836cc6321485605153c51cbab91734d28..0d3e1a121b670a1d251db529eef206503c8f6e62 100644 (file)
@@ -1786,8 +1786,10 @@ static int sienna_cichlid_set_power_profile_mode(struct smu_context *smu, long *
                                                       smu->power_profile_mode);
        if (workload_type < 0)
                return -EINVAL;
-       smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetWorkloadMask,
+       ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetWorkloadMask,
                                    1 << workload_type, NULL);
+       if (ret)
+               dev_err(smu->adev->dev, "[%s] Failed to set work load mask!", __func__);
 
        return ret;
 }