drm/ttm: rework BO delayed delete. v2
authorChristian König <christian.koenig@amd.com>
Mon, 11 Nov 2019 13:42:13 +0000 (14:42 +0100)
committerChristian König <christian.koenig@amd.com>
Wed, 12 Feb 2020 12:03:27 +0000 (13:03 +0100)
commit1ec39923ef24f55eaa12cbdbdd9bb7e4ba29f6a7
treedb1e8f34b59de4896c52a252fd785cdef0510907
parentb1df3a2b24a917f8853d43fe9683c0e360d2c33a
drm/ttm: rework BO delayed delete. v2

This patch reworks the whole delayed deletion of BOs which aren't idle.

Instead of having two counters for the BO structure we resurrect the BO
when we find that a deleted BO is not idle yet.

This has many advantages, especially that we don't need to
increment/decrement the BOs reference counter any more when it
moves on the LRUs.

v2: remove duplicate ttm_tt_destroy, fix holde lock for LRU move

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: xinhui pan <xinhui.pan@amd.com>
Link: https://patchwork.freedesktop.org/patch/352912/
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
include/drm/ttm/ttm_bo_api.h