<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Reviewed-by: Monk Liu <monk.liu@amd.com><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Xiangliang Yu <Xiangliang.Yu@amd.com><br>
<b>发送时间:</b> 2017年1月18日 13:00:14<br>
<b>收件人:</b> amd-gfx@lists.freedesktop.org<br>
<b>抄送:</b> Yu, Xiangliang<br>
<b>主题:</b> [PATCH 1/2] drm/amdgpu: fix reboot failure issue for virtualization</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Reboot process will call HW fini functions of IP blocks. For virt,<br>
need to send event three before hw fini and send event four after<br>
hw fini.<br>
<br>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++<br>
 1 file changed, 6 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index 2868128..4b82081 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -1566,6 +1566,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)<br>
 {<br>
         int i, r;<br>
 <br>
+       if (amdgpu_sriov_vf(adev))<br>
+               amdgpu_virt_request_full_gpu(adev, false);<br>
+<br>
         /* ungate SMC block first */<br>
         r = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_SMC,<br>
                                          AMD_CG_STATE_UNGATE);<br>
@@ -1594,6 +1597,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)<br>
                 }<br>
         }<br>
 <br>
+       if (amdgpu_sriov_vf(adev))<br>
+               amdgpu_virt_release_full_gpu(adev, false);<br>
+<br>
         return 0;<br>
 }<br>
 <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>
</body>
</html>