diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2024-07-05 17:31:59 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2024-07-09 12:37:32 +0200 |
commit | 6be74ddd0609959b4005f88b6a4d4af678e4a71f (patch) | |
tree | 33a9be1caec9b2787befe9cb843a38fe9a9b76bf /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | ce7c90bfda2656418c69ba0dd8f8a7536b8928d4 (diff) | |
download | linux-6be74ddd0609959b4005f88b6a4d4af678e4a71f.tar.gz linux-6be74ddd0609959b4005f88b6a4d4af678e4a71f.tar.bz2 linux-6be74ddd0609959b4005f88b6a4d4af678e4a71f.zip |
drm/ttm: Allow TTM LRU list nodes of different types
To be able to handle list unlocking while traversing the LRU
list, we want the iterators not only to point to the next
position of the list traversal, but to insert themselves as
list nodes at that point to work around the fact that the
next node might otherwise disappear from the list while
the iterator is pointing to it.
These list nodes need to be easily distinguishable from other
list nodes so that others traversing the list can skip
over them.
So declare a struct ttm_lru_item, with a struct list_head member
and a type enum. This will slightly increase the size of a
struct ttm_resource.
Changes in previous series:
- Update enum ttm_lru_item_type documentation.
v3:
- Introduce ttm_lru_first_res_or_null()
(Christian König, Thomas Hellström)
v5:
- Update also the TTM test code (Xe CI).
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>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-2-thomas.hellstrom@linux.intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
0 files changed, 0 insertions, 0 deletions