Merge tag 'amd-drm-next-6.3-2023-01-27' of https://gitlab.freedesktop.org/agd5f/linux...
[linux-block.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_device.c
index 036657162cf4ddc8830a539953f2953842c285e5..5bee3ff623442e925cdf3c775598d1fb2a998791 100644 (file)
@@ -38,6 +38,7 @@
 
 #include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/amdgpu_drm.h>
@@ -4007,10 +4008,8 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
        }
        amdgpu_fence_driver_hw_fini(adev);
 
-       if (adev->mman.initialized) {
-               flush_delayed_work(&adev->mman.bdev.wq);
-               ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
-       }
+       if (adev->mman.initialized)
+               drain_workqueue(adev->mman.bdev.wq);
 
        if (adev->pm_sysfs_en)
                amdgpu_pm_sysfs_fini(adev);