<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>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>thanks for the catch, without those full access protection reboot is failed, I'll remove it and adjust later patches for TDR
<br>
</p>
<p><br>
</p>
<p>BR Monk<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>发件人:</b> Liu, Monk<br>
<b>发送时间:</b> 2017年2月6日 10:39:08<br>
<b>收件人:</b> Yu, Xiangliang; amd-gfx@lists.freedesktop.org<br>
<b>主题:</b> 答复: [PATCH 05/21] drm/amdgpu:BUG if gpu_reste and asic_reset from VF</font>
<div> </div>
</div>
<div>
<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>yeah, there are 21 patches totally, but no need to expose all in one time<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> Yu, Xiangliang<br>
<b>发送时间:</b> 2017年2月6日 10:38:23<br>
<b>收件人:</b> Liu, Monk; amd-gfx@lists.freedesktop.org<br>
<b>抄送:</b> Liu, Monk<br>
<b>主题:</b> RE: [PATCH 05/21] drm/amdgpu:BUG if gpu_reste and asic_reset from VF</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Have you tried the patch for unloading driver?<br>
<br>
Ps: the index of patch make people confused, I think there are 21 patches in the series.<br>
<br>
<br>
Thanks!<br>
Xiangliang Yu<br>
<br>
<br>
> -----Original Message-----<br>
> From: amd-gfx [<a href="mailto:amd-gfx-bounces@lists.freedesktop.org">mailto:amd-gfx-bounces@lists.freedesktop.org</a>] On Behalf<br>
> Of Monk Liu<br>
> Sent: Saturday, February 04, 2017 6:35 PM<br>
> To: amd-gfx@lists.freedesktop.org<br>
> Cc: Liu, Monk <Monk.Liu@amd.com><br>
> Subject: [PATCH 05/21] drm/amdgpu:BUG if gpu_reste and asic_reset from<br>
> VF<br>
> <br>
> for SRIOV vf, Guest couldn't really access PCI registers so<br>
> gpu_reset() and asic_reset should be avoided.<br>
> <br>
> for suspend it could run for SRIOV because cg/pg routine already modified<br>
> for SRIOV vf case, besides we should remove the req/rel gpu access around<br>
> it because the req/rel should be used by invoker.<br>
> <br>
> Change-Id: I678d3f2ce202458c1d1d404970fa47421766b666<br>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +--------<br>
> drivers/gpu/drm/amd/amdgpu/vi.c | 2 ++<br>
> 2 files changed, 3 insertions(+), 8 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> index 6106cd6..173df73 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> @@ -1566,9 +1566,6 @@ 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,<br>
> AMD_IP_BLOCK_TYPE_SMC,<br>
> AMD_CG_STATE_UNGATE);<br>
> @@ -1597,9 +1594,6 @@ 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>
> @@ -2356,8 +2350,7 @@ int amdgpu_gpu_reset(struct amdgpu_device<br>
> *adev)<br>
> int resched;<br>
> bool need_full_reset;<br>
> <br>
> - if (amdgpu_sriov_vf(adev))<br>
> - return 0;<br>
> + BUG_ON(amdgpu_sriov_vf(adev));<br>
> <br>
> if (!amdgpu_check_soft_reset(adev)) {<br>
> DRM_INFO("No hardware hang detected. Did some blocks<br>
> stall?\n"); diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c<br>
> b/drivers/gpu/drm/amd/amdgpu/vi.c index 7810030..557994c 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c<br>
> @@ -739,6 +739,8 @@ static int vi_asic_reset(struct amdgpu_device *adev)<br>
> {<br>
> int r;<br>
> <br>
> + BUG_ON(amdgpu_sriov_vf(adev));<br>
> +<br>
> amdgpu_atombios_scratch_regs_engine_hung(adev, true);<br>
> <br>
> r = vi_gpu_pci_config_reset(adev);<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>