<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);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</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> Tuikov, Luben <Luben.Tuikov@amd.com><br>
<b>Sent:</b> Monday, November 22, 2021 5:25 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Tuikov, Luben <Luben.Tuikov@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> [PATCH 3/3] drm/amd/pm: Print the error on command submission</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Print the error on command submission immediately after submitting to<br>
the SMU. This is rate-limited. It helps to immediately know there was an<br>
error on command submission, rather than leave it up to clients to report<br>
the error, as sometimes they do not.<br>
<br>
Cc: Alex Deucher <Alexander.Deucher@amd.com><br>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com><br>
Acked-by: Alex Deucher <Alexander.Deucher@amd.com><br>
---<br>
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<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 f9a42a07eeaebf..048ca16738638f 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c<br>
@@ -352,7 +352,7 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,<br>
         __smu_cmn_send_msg(smu, (uint16_t) index, param);<br>
         reg = __smu_cmn_poll_stat(smu);<br>
         res = __smu_cmn_reg2errno(smu, reg);<br>
-       if (res == -EREMOTEIO)<br>
+       if (res != 0)<br>
                 __smu_cmn_reg_print_error(smu, reg, index, param, msg);<br>
         if (read_arg)<br>
                 smu_cmn_read_arg(smu, read_arg);<br>
-- <br>
2.34.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>