<div dir="ltr">I'm hoping this fixes the slow shutdown time of my laptop, which seems to switch the card back on right before switching off<div><br></div><div>It's been an issue since the introduction of KIQ (around the same time)</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 13 Dec 2017 at 12:07 Tao, Yintian <<a href="mailto:Yintian.Tao@amd.com">Yintian.Tao@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-3629717190469819022WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Lothian<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">First of all, thanks for your review.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">No, it is the patch which achieve the same function for the issue. But it is the root cause of fence timeout.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-top:.25in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The patch
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><a href="https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-4.16-wip&id=b9141cd3930e390f156739829ca9589fda7926e4" target="_blank"><span style="text-decoration:none">b9141cd3</span></a>
</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">is the word-around for the issue. And I think the varible “shutdown” assignment is better to be located after amdgpu_fini() to ensure no irq miss.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Best Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Yintian Tao<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Mike Lothian [mailto:<a href="mailto:mike@fireburn.co.uk" target="_blank">mike@fireburn.co.uk</a>]
<br>
<b>Sent:</b> Wednesday, December 13, 2017 7:23 PM<br>
<b>To:</b> Tao, Yintian <<a href="mailto:Yintian.Tao@amd.com" target="_blank">Yintian.Tao@amd.com</a>><br>
<b>Cc:</b> <a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: Fix no irq process when evict vram<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_-3629717190469819022WordSection1">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Is this a follow on to <a href="https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-4.16-wip&id=b9141cd3930e390f156739829ca9589fda7926e4" target="_blank">https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-4.16-wip&id=b9141cd3930e390f156739829ca9589fda7926e4</a> <u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, 13 Dec 2017 at 07:11 Yintian Tao <<a href="mailto:yttao@amd.com" target="_blank">yttao@amd.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">When unload amdgpu driver we use sdma to evict vram but there is no<br>
irq process after sdma completed work which raises that waiting for the<br>
fence costs 2s which will trigger VFLR under SRIOV and at last make<br>
unload driver failed.The reason is that the shutdown varible in adev<br>
is set to true before evict vram, it cause ISR directly return without<br>
processing.Therefore, we need set the varible after evict vram.<br>
<br>
Change-Id: I7bf75481aa0744b99c41672b49670adc70b478bd<br>
Signed-off-by: Yintian Tao <<a href="mailto:yttao@amd.com" target="_blank">yttao@amd.com</a>><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index a269bbc..80934ee 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -2458,7 +2458,6 @@ void amdgpu_device_fini(struct amdgpu_device *adev)<br>
int r;<br>
<br>
DRM_INFO("amdgpu: finishing device.\n");<br>
- adev->shutdown = true;<br>
if (adev->mode_info.mode_config_initialized)<br>
drm_crtc_force_disable_all(adev->ddev);<br>
<br>
@@ -2466,6 +2465,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)<br>
amdgpu_fence_driver_fini(adev);<br>
amdgpu_fbdev_fini(adev);<br>
r = amdgpu_fini(adev);<br>
+ adev->shutdown = true;<br>
if (adev->firmware.gpu_info_fw) {<br>
release_firmware(adev->firmware.gpu_info_fw);<br>
adev->firmware.gpu_info_fw = NULL;<br>
--<br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><u></u><u></u></p>
</blockquote>
</div>
</div></div></blockquote></div>