Re: [PATCH 1/2] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-03 Thread Michel Dänzer
Pan, you're sending patches to amd-gfx-boun...@lists.freedesktop.org, which doesn't work. You need to send them to amd-...@lists.freedesktop.org instead. -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X

Re: [PATCH 1/2] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-03 Thread Christian König
Am 03.09.21 um 08:49 schrieb Pan, Xinhui: The ret value might be -EBUSY, caller will think lru lock is still locked but actually NOT. So return -ENOSPC instead. Otherwise we hit list corruption. ttm_bo_cleanup_refs might fail too if BO is not idle. If we return 0, caller(ttm_tt_populate -> ttm_g

[PATCH 1/2] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-02 Thread Pan, Xinhui
The ret value might be -EBUSY, caller will think lru lock is still locked but actually NOT. So return -ENOSPC instead. Otherwise we hit list corruption. ttm_bo_cleanup_refs might fail too if BO is not idle. If we return 0, caller(ttm_tt_populate -> ttm_global_swapout ->ttm_device_swapout) will be