<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">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Series is:</p>
<p style="margin-top:0;margin-bottom:0">Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Xiangliang Yu <Xiangliang.Yu@amd.com><br>
<b>Sent:</b> Wednesday, December 5, 2018 1:46:31 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Min, Frank; Yu, Xiangliang<br>
<b>Subject:</b> [PATCH 3/3] drm/amdgpu/psp: Destroy psp ring when doing gpu reset</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">PSP ring need to be destroy before starting reinit for vf.<br>
This patche move it from hypervisor driver into guest.<br>
<br>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com><br>
Signed-off-by: Frank Min <Frank.Min@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 +++-<br>
 1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
index 3142f84..6759d89 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
@@ -548,8 +548,10 @@ static int psp_load_fw(struct amdgpu_device *adev)<br>
         int ret;<br>
         struct psp_context *psp = &adev->psp;<br>
 <br>
-       if (amdgpu_sriov_vf(adev) && adev->in_gpu_reset != 0)<br>
+       if (amdgpu_sriov_vf(adev) && adev->in_gpu_reset) {<br>
+               psp_ring_destroy(psp, PSP_RING_TYPE__KM);<br>
                 goto skip_memalloc;<br>
+       }<br>
 <br>
         psp->cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);<br>
         if (!psp->cmd)<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>