<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
will respin and incorporate your suggestions</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,
<div>Darren</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Paul Menzel <pmenzel@molgen.mpg.de><br>
<b>Sent:</b> Friday, April 8, 2022 2:29 AM<br>
<b>To:</b> Powell, Darren <Darren.Powell@amd.com><br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Tuikov, Luben <Luben.Tuikov@amd.com>; Quan, Evan <Evan.Quan@amd.com>; wenhui.sheng@amd.com <wenhui.sheng@amd.com>; Grodzovsky, Andrey <Andrey.Grodzovsky@amd.com><br>
<b>Subject:</b> Re: [PATCH 1/1] amdgpu/pm: Clarify Documentation of error handling in send_smc_mesg</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Dear Darren,<br>
<br>
<br>
Thank you for your patch.<br>
<br>
Am 08.04.22 um 04:26 schrieb Darren Powell:<br>
>   Contrary to the smu_cmn_send_smc_msg_with_param documentation, two<br>
>   cases exist where messages are silently dropped with no error returned<br>
>   to the caller. These cases occur in unusual situations where either:<br>
>    1. the caller is a virtual GPU, or<br>
>    2. a PCI recovery is underway and the HW is not yet in sync with the SW<br>
> <br>
>   For more details see<br>
>    commit 4ea5081c82c4 ("drm/amd/powerplay: enable SMC message filter")<br>
>    commit bf36b52e781d ("drm/amdgpu: Avoid accessing HW when suspending SW state")<br>
<br>
Please remove the indentation. If you re-rolled the patch, you could <br>
also spell *documentation* lowercase in the commit message summary.<br>
<br>
> Signed-off-by: Darren Powell <darren.powell@amd.com><br>
> ---<br>
>   drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 7 +++++--<br>
>   1 file changed, 5 insertions(+), 2 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c<br>
> index b8d0c70ff668..b1bd1990c88b 100644<br>
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c<br>
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c<br>
> @@ -356,12 +356,15 @@ int smu_cmn_wait_for_response(struct smu_context *smu)<br>
>    * completion of the command, and return back a value from the SMU in<br>
>    * @read_arg pointer.<br>
>    *<br>
> - * Return 0 on success, -errno on error, if we weren't able to send<br>
> + * Return 0 on success, or if the message is dropped.<br>
> + * On error, -errno is returned if we weren't able to send<br>
>    * the message or if the message completed with some kind of<br>
>    * error. See __smu_cmn_reg2errno() for details of the -errno.<br>
>    *<br>
>    * If we weren't able to send the message to the SMU, we also print<br>
> - * the error to the standard log.<br>
> + * the error to the standard log. Dropped messages can be caused<br>
> + * due to PCI slot recovery or attempting to send from a virtual GPU,<br>
> + * and do not print an error.<br>
>    *<br>
>    * Command completion status is printed only if the -errno is<br>
>    * -EREMOTEIO, indicating that the SMU returned back an<br>
> <br>
> base-commit: 4585c45a6a66cb17cc97f4370457503746e540b7<br>
<br>
The diff looks good – despite Mozilla Thunderbird quoting it strangely.<br>
<br>
<br>
Kind regards,<br>
<br>
Paul<br>
</div>
</span></font></div>
</div>
</body>
</html>