linux/include/drm/ttm
Thomas Hellström 3756310e9f drm/ttm: Use the LRU walker for eviction
Use the LRU walker for eviction. This helps
removing a lot of code with weird locking
semantics.

The functionality is slightly changed so that
when trylocked buffer objects are exhausted, we
continue to interleave walks with ticket-locks while
there is still progress made. The list walks are
not restarted in-between evictions.

Also provide a separate ttm_bo_evict_first()
function for its single user. The context of that
user allows sleeping dma_resv locks.

v6:
- Various cleanups suggested by Matthew Brost.
- Fix error return code of ttm_bo_evict_first(). (Matthew Brost)
- Fix an error check that was inverted. (Matthew Brost)
v7:
- Use s64 rather than long (Christian König)
- Early ttm_resource_cursor_fini() in ttm_bo_evict_first().
- Simplify check for bo_moved in ttm_bo_evict_first().
  (Christian König)
- Don't evict pinned bos.

Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com> #v6
Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-8-thomas.hellstrom@linux.intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
2024-07-09 12:42:18 +02:00
..
ttm_bo.h drm/ttm: Use the LRU walker for eviction 2024-07-09 12:42:18 +02:00
ttm_caching.h drm/ttm: make ttm_caching.h self-contained 2024-03-11 11:47:06 +02:00
ttm_device.h drm/ttm: let struct ttm_device_funcs be placed in rodata 2023-05-17 11:28:28 +03:00
ttm_execbuf_util.h drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings 2024-03-11 11:47:06 +02:00
ttm_kmap_iter.h drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings 2024-03-11 11:47:06 +02:00
ttm_placement.h drm/ttm: replace busy placement with flags v6 2024-01-25 09:59:44 +01:00
ttm_pool.h drm/ttm: make ttm_pool.h self-contained 2024-03-11 11:47:06 +02:00
ttm_range_manager.h drm/ttm: Try to check if new ttm man out of bounds during compile 2021-09-13 10:14:28 +02:00
ttm_resource.h drm/ttm: Use the LRU walker helper for swapping 2024-07-09 12:41:46 +02:00
ttm_tt.h drm/ttm: Make sure the mapped tt pages are decrypted when needed 2024-01-26 14:10:52 -05:00