[AMD Official Use Only - General] This patch is, Reviewed-by: Tim Huang <Tim.Huang@xxxxxxx> > -----Original Message----- > From: Jesse Zhang <jesse.zhang@xxxxxxx> > Sent: Friday, May 10, 2024 10:50 AM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian > <Christian.Koenig@xxxxxxx>; Huang, Tim <Tim.Huang@xxxxxxx>; Zhang, > Jesse(Jie) <Jesse.Zhang@xxxxxxx>; Zhang, Jesse(Jie) > <Jesse.Zhang@xxxxxxx> > Subject: [PATCH 07/22] drm/amd/pm: check the return of send smc msg for > navi10 > > Set smu work laod mask may fail, so check return. > Signed-off-by: Jesse Zhang <Jesse.Zhang@xxxxxxx> > --- > drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > index c06e0d6e3017..f30f1facc0f6 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > @@ -2081,9 +2081,11 @@ static int navi10_set_power_profile_mode(struct > smu_context *smu, long *input, u > 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