drm/ttm: optimize ttm_mem_evict_first v5
authorChristian König <christian.koenig@amd.com>
Wed, 8 Nov 2017 14:55:44 +0000 (15:55 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2017 17:47:48 +0000 (12:47 -0500)
commit6ba435812e0d85b016670ba7324d1bb1369d8428
tree651813f7084a06df446bb5a8c3f410b976101594
parent56f3df448c9458ffd4c2ae62c09afc99f7ab277d
drm/ttm: optimize ttm_mem_evict_first v5

Deleted BOs with the same reservation object can be reaped even if they
can't be reserved.

v2: rebase and we still need to remove/add the BO from/to the LRU.
v3: fix remove/add one more time, cleanup the logic a bit
v4: we should still check if the eviction is valuable
v5: add comment suggested by Michel

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_bo.c