On Tue, Jul 13, 2021 at 03:00:57PM +0800, Liu, Aaron wrote: > Remove mdelay process and use smu_cmn_send_smc_msg_with_param to send > mode-reset message to SMC. > > Signed-off-by: Aaron Liu <aaron.liu@xxxxxxx> Reviewed-by: Huang Rui <ray.huang@xxxxxxx> > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c > index de92f713a911..0cfeb9fc7c03 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c > @@ -298,13 +298,9 @@ static int yellow_carp_mode_reset(struct smu_context *smu, int type) > if (index < 0) > return index == -EACCES ? 0 : index; > > - mutex_lock(&smu->message_lock); > - > - ret = smu_cmn_send_msg_without_waiting(smu, (uint16_t)index, type); > - > - mutex_unlock(&smu->message_lock); > - > - mdelay(10); > + ret = smu_cmn_send_smc_msg_with_param(smu, (uint16_t)index, type, NULL); > + if (ret) > + dev_err(smu->adev->dev, "Failed to mode reset!\n"); > > return ret; > } > -- > 2.25.1 > _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx