From: Jesse Zhang Date: Wed, 8 May 2024 09:32:32 +0000 (+0800) Subject: drm/amd/pm: check the return of send smc msg for sienna_cichild X-Git-Tag: v6.11-rc1~141^2~25^2~235 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f684a67f80adaf98fa9b0b1363f518e65c02289;p=thirdparty%2Fkernel%2Flinux.git drm/amd/pm: check the return of send smc msg for sienna_cichild Set smu work laod mask may fail, so check return. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index d5a21d7836cc6..0d3e1a121b670 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -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; }