[AMD Official Use Only - General] This patch is,
Reviewed-by: Tim Huang <tim.hu...@amd.com> > -----Original Message----- > From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> On Behalf Of Jesse > Zhang > Sent: Friday, May 10, 2024 10:50 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander <alexander.deuc...@amd.com>; Koenig, Christian > <christian.koe...@amd.com>; Huang, Tim <tim.hu...@amd.com>; Zhang, > Jesse(Jie) <jesse.zh...@amd.com>; Zhang, Jesse(Jie) > <jesse.zh...@amd.com> > Subject: [PATCH 08/22] drm/amd/pm: check the return of send smc msg for > smu_v13 > > Set smu work laod mask may fail, so check return. > > Signed-off-by: Jesse Zhang <jesse.zh...@amd.com> > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c > b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c > index e996a0a4d33e..dcb68ab51fa0 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c > @@ -2495,8 +2495,10 @@ static int > smu_v13_0_7_set_power_profile_mode(struct smu_context *smu, long *inp > 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; > } > -- > 2.25.1