<div dir="ltr">Is this a follow on to <a href="https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-4.16-wip&id=b9141cd3930e390f156739829ca9589fda7926e4">https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-4.16-wip&id=b9141cd3930e390f156739829ca9589fda7926e4</a> </div><br><div class="gmail_quote"><div dir="ltr">On Wed, 13 Dec 2017 at 07:11 Yintian Tao <<a href="mailto:yttao@amd.com">yttao@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</blockquote></div>