<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">This seems like a good thing to do in general even with Monk's fix.
<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</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 Yintian Tao <yttao@amd.com><br>
<b>Sent:</b> Tuesday, December 12, 2017 10:37:43 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Tao, Yintian<br>
<b>Subject:</b> [PATCH] drm/amdgpu: Fix no irq process when evict vram</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">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 <yttao@amd.com><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>
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>