mirror-linux/include/drm/ttm
Pierre-Eric Pelloux-Prayer ddf055b80a drm/ttm: rework pipelined eviction fence handling
Until now ttm stored a single pipelined eviction fence which means
drivers had to use a single entity for these evictions.

To lift this requirement, this commit allows up to 8 entities to
be used.

Ideally a dma_resv object would have been used as a container of
the eviction fences, but the locking rules makes it complex.
dma_resv all have the same ww_class, which means "Attempting to
lock more mutexes after ww_acquire_done." is an error.

One alternative considered was to introduced a 2nd ww_class for
specific resv to hold a single "transient" lock (= the resv lock
would only be held for a short period, without taking any other
locks).

The other option, is to statically reserve a fence array, and
extend the existing code to deal with N fences, instead of 1.

The driver is still responsible to reserve the correct number
of fence slots.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Link: https://lore.kernel.org/r/20251121101315.3585-20-pierre-eric.pelloux-prayer@amd.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
2025-11-26 13:12:23 +01:00
..
ttm_allocation.h drm/ttm: Add an allocation flag to propagate -ENOSPC on OOM 2025-10-31 09:27:28 +00:00
ttm_backup.h drm/ttm: Remove the struct ttm_backup abstraction 2025-05-06 10:57:27 +02:00
ttm_bo.h drm/ttm: rename ttm_bo_put to _fini v3 2025-09-17 14:03:21 +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: Fix @alloc_flags description 2025-11-06 10:35:47 +00: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: Fix @alloc_flags description 2025-11-06 10:35:47 +00: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: rework pipelined eviction fence handling 2025-11-26 13:12:23 +01:00
ttm_tt.h drm/ttm: Remove the struct ttm_backup abstraction 2025-05-06 10:57:27 +02:00