<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
p.msipheaderdf3d92d6, li.msipheaderdf3d92d6, div.msipheaderdf3d92d6
{mso-style-name:msipheaderdf3d92d6;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle22
{mso-style-type:personal-compose;
font-family:"Arial",sans-serif;
color:blue;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="msipheaderdf3d92d6" style="margin:0in"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">[AMD Official Use Only - General]</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoPlainText"><a id="OWAAMD3450450D7EF4059BBB8826BF515F3BA" href="mailto:Alexander.Deucher@amd.com"><span style="font-family:"Calibri",sans-serif;text-decoration:none">@Deucher, Alexander</span></a><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Following up on this to see if the patch reviewed and approved for up streaming?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">SIRISH <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: Zhao, Victor <Victor.Zhao@amd.com> <br>
Sent: Thursday, November 3, 2022 12:08 AM<br>
To: Zhao, Victor <Victor.Zhao@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com><br>
Cc: Zhang, Bokun <Bokun.Zhang@amd.com>; Chickanayakanahalli, Sirish <sirish.c@amd.com><br>
Subject: RE: [PATCH] drm/amdgpu: fix for suspend/resume sequence under sriov<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[AMD Official Use Only - General]<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Hi Alex,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">This is a patch fixing the sriov suspend/resume sequence. Please help review.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks,<o:p></o:p></p>
<p class="MsoPlainText">Victor<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">From: Victor Zhao <<a href="mailto:Victor.Zhao@amd.com"><span style="color:windowtext;text-decoration:none">Victor.Zhao@amd.com</span></a>>
<o:p></o:p></p>
<p class="MsoPlainText">Sent: Thursday, November 3, 2022 12:06 PM<o:p></o:p></p>
<p class="MsoPlainText">To: <a href="mailto:amd-gfx@lists.freedesktop.org"><span style="color:windowtext;text-decoration:none">amd-gfx@lists.freedesktop.org</span></a>; Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com"><span style="color:windowtext;text-decoration:none">Alexander.Deucher@amd.com</span></a>><o:p></o:p></p>
<p class="MsoPlainText">Cc: Zhao, Victor <<a href="mailto:Victor.Zhao@amd.com"><span style="color:windowtext;text-decoration:none">Victor.Zhao@amd.com</span></a>><o:p></o:p></p>
<p class="MsoPlainText">Subject: [PATCH] drm/amdgpu: fix for suspend/resume sequence under sriov<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">- clear kiq ring after suspend/resume under sriov to aviod kiq ring test failure<o:p></o:p></p>
<p class="MsoPlainText">- update irq after resume to fix kiq interrput loss<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Signed-off-by: Victor Zhao <<a href="mailto:Victor.Zhao@amd.com"><span style="color:windowtext;text-decoration:none">Victor.Zhao@amd.com</span></a>><o:p></o:p></p>
<p class="MsoPlainText">---<o:p></o:p></p>
<p class="MsoPlainText">drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++<o:p></o:p></p>
<p class="MsoPlainText">drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++<o:p></o:p></p>
<p class="MsoPlainText">2 files changed, 4 insertions(+)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<o:p></o:p></p>
<p class="MsoPlainText">index 522820eeaa59..5b9f992e4607 100644<o:p></o:p></p>
<p class="MsoPlainText">--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<o:p></o:p></p>
<p class="MsoPlainText">+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<o:p></o:p></p>
<p class="MsoPlainText">@@ -4197,6 +4197,8 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)<o:p></o:p></p>
<p class="MsoPlainText"> }<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> /* Make sure IB tests flushed */<o:p></o:p></p>
<p class="MsoPlainText">+ if (amdgpu_sriov_vf(adev))<o:p></o:p></p>
<p class="MsoPlainText">+ amdgpu_irq_gpu_reset_resume_helper(adev);<o:p></o:p></p>
<p class="MsoPlainText"> flush_delayed_work(&adev->delayed_init_work);<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> if (adev->in_s0ix) {<o:p></o:p></p>
<p class="MsoPlainText">diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<o:p></o:p></p>
<p class="MsoPlainText">index 7853d3ca58cf..49d34c7bbf20 100644<o:p></o:p></p>
<p class="MsoPlainText">--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<o:p></o:p></p>
<p class="MsoPlainText">+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<o:p></o:p></p>
<p class="MsoPlainText">@@ -6909,6 +6909,8 @@ static int gfx_v10_0_kiq_init_queue(struct amdgpu_ring *ring)<o:p></o:p></p>
<p class="MsoPlainText"> mutex_unlock(&adev->srbm_mutex);<o:p></o:p></p>
<p class="MsoPlainText"> } else {<o:p></o:p></p>
<p class="MsoPlainText"> memset((void *)mqd, 0, sizeof(*mqd));<o:p></o:p></p>
<p class="MsoPlainText">+ if (amdgpu_sriov_vf(adev) && adev->in_suspend)<o:p></o:p></p>
<p class="MsoPlainText">+ amdgpu_ring_clear_ring(ring);<o:p></o:p></p>
<p class="MsoPlainText"> mutex_lock(&adev->srbm_mutex);<o:p></o:p></p>
<p class="MsoPlainText"> nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);<o:p></o:p></p>
<p class="MsoPlainText"> amdgpu_ring_init_mqd(ring);<o:p></o:p></p>
<p class="MsoPlainText">--<o:p></o:p></p>
<p class="MsoPlainText">2.25.1<o:p></o:p></p>
</div>
</body>
</html>