<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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);">
I needed to dig further down to find the message map, I had been looking back in mailing list looking for clarification but hadn't found anything.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Will reword</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Darren</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> Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Sent:</b> Tuesday, April 12, 2022 12:19 AM<br>
<b>To:</b> Powell, Darren <Darren.Powell@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Tuikov, Luben <Luben.Tuikov@amd.com>; Quan, Evan <Evan.Quan@amd.com>; Grodzovsky, Andrey <Andrey.Grodzovsky@amd.com>; pmenzel@molgen.mpg.de <pmenzel@molgen.mpg.de><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"><br>
<br>
On 4/12/2022 9:38 AM, Darren Powell wrote:<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 message target is a virtual GPU, or<br>
<br>
This is not fully correct - only messages which are not valid for <br>
virtual GPU are dropped, not all.<br>
<br>
Thanks,<br>
Lijo<br>
<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>
> (v2)<br>
>    Reworked with suggestions from Luben & Paul<br>
> <br>
> Signed-off-by: Darren Powell <darren.powell@amd.com><br>
> ---<br>
>   drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 +++++---<br>
>   1 file changed, 5 insertions(+), 3 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..8008ae5508e6 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,9 +356,11 @@ 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>
> - * the message or if the message completed with some kind of<br>
> - * error. See __smu_cmn_reg2errno() for details of the -errno.<br>
> + * Return 0 on success, -errno when a problem is encountered sending<br>
> + * message or receiving reply. If there is a PCI bus recovery or<br>
> + * the destination is a virtual GPU, the message is simply dropped and<br>
> + * success is also returned.<br>
> + * 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>
> <br>
> base-commit: 4585c45a6a66cb17cc97f4370457503746e540b7<br>
> <br>
</div>
</span></font></div>
</div>
</body>
</html>