Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: flush delete wq after wait fence

[why]
lru_list not empty warning in sw fini during repeated device bind unbind.
There should be a amdgpu_fence_wait_empty() before the flush_delayed_work()
call as Christian suggested.

[how]
Move to do flush_delayed_work for ttm bo delayed delete wq after fence_driver_hw_fini.

Tested by: Yiqing Yao <yiqing.yao@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Yiqing Yao <yiqing.yao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yiqing Yao and committed by
Alex Deucher
98f56188 f333c9c6

+5 -4
+5 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 3972 3972 { 3973 3973 dev_info(adev->dev, "amdgpu: finishing device.\n"); 3974 3974 flush_delayed_work(&adev->delayed_init_work); 3975 - if (adev->mman.initialized) { 3976 - flush_delayed_work(&adev->mman.bdev.wq); 3977 - ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); 3978 - } 3979 3975 adev->shutdown = true; 3980 3976 3981 3977 /* make sure IB test finished before entering exclusive mode ··· 3991 3995 drm_atomic_helper_shutdown(adev_to_drm(adev)); 3992 3996 } 3993 3997 amdgpu_fence_driver_hw_fini(adev); 3998 + 3999 + if (adev->mman.initialized) { 4000 + flush_delayed_work(&adev->mman.bdev.wq); 4001 + ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); 4002 + } 3994 4003 3995 4004 if (adev->pm_sysfs_en) 3996 4005 amdgpu_pm_sysfs_fini(adev);