1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/ttm/tests
Thomas Hellström 6be74ddd06 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>
2024-07-09 12:37:32 +02:00
..
.kunitconfig drm/ttm/tests: Delete unnecessary config option 2024-06-24 16:01:13 +05:30
Makefile drm/ttm/tests: Add tests with mock resource managers 2024-06-24 16:01:17 +05:30
TODO drm/ttm/tests: Add TODO file 2024-06-24 16:01:24 +05:30
ttm_bo_test.c drm/ttm: Allow TTM LRU list nodes of different types 2024-07-09 12:37:32 +02:00
ttm_bo_validate_test.c drm/ttm/tests: add missing MODULE_DESCRIPTION() macros 2024-06-25 09:53:13 +02:00
ttm_device_test.c drm/ttm/tests: add missing MODULE_DESCRIPTION() macros 2024-06-25 09:53:13 +02:00
ttm_kunit_helpers.c drm/ttm/tests: add missing MODULE_DESCRIPTION() macros 2024-06-25 09:53:13 +02:00
ttm_kunit_helpers.h drm/ttm/tests: Use u32 and u64 over uint*_t types 2024-06-24 16:01:26 +05:30
ttm_mock_manager.c drm/ttm/tests: add missing MODULE_DESCRIPTION() macros 2024-06-25 09:53:13 +02:00
ttm_mock_manager.h drm/ttm/tests: Add eviction testing 2024-06-24 16:01:21 +05:30
ttm_pool_test.c drm/ttm/tests: add missing MODULE_DESCRIPTION() macros 2024-06-25 09:53:13 +02:00
ttm_resource_test.c drm/ttm: Allow TTM LRU list nodes of different types 2024-07-09 12:37:32 +02:00
ttm_tt_test.c drm/ttm/tests: add missing MODULE_DESCRIPTION() macros 2024-06-25 09:53:13 +02:00