linux/drivers/gpu/drm/ttm
Thomas Hellström 1d3160c7cb drm/ttm/pool: Restructure the pool allocation code
Simplify the pool allocation code somewhat by merging loop arguments
used by multiple functions together in a struct and simplifying the
loop. Also add documentation.
This hopefully makes the behaviour of the allocation loop
simplier to understand, but above all paves the way for upcoming
restore-while-allocating functionality.

There are no functional changes, but the "allow_pools" bool
introduced to keep current functionality could be removed as a
follow up, which would enable using write-back cached pools when
allocating memory for other caching modes, rather than to resort
to allocating from the system directly.

v15:
- Introduce this patch to simplify the upcoming patch that introduces
  restore while allocating.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241217145852.37342-4-thomas.hellstrom@linux.intel.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
History 2025-01-13 12:58:10 +01:00
..
tests drm/ttm: Move swapped objects off the manager's LRU list 2024-10-09 13:41:30 +02:00
Makefile drm/ttm: Introduce KUnit test 2023-08-09 18:04:22 +02:00
ttm_agp_backend.c drm/ttm: Add a parameter to add extra pages into ttm_tt 2022-04-02 08:22:48 +05:30
ttm_bo.c drm/ttm: Balance ttm_resource_cursor_init() and ttm_resource_cursor_fini() 2025-01-13 12:58:10 +01:00
ttm_bo_util.c drm/ttm: Balance ttm_resource_cursor_init() and ttm_resource_cursor_fini() 2025-01-13 12:58:10 +01:00
ttm_bo_vm.c drm/ttm: use GEM references for VM mappings 2024-12-03 18:02:13 +01:00
ttm_device.c drm/ttm: Move swapped objects off the manager's LRU list 2024-10-09 13:41:30 +02:00
ttm_execbuf_util.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
ttm_module.c LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
ttm_module.h drm/ttm: add ttm_sys_manager v3 2021-05-03 12:50:41 +02:00
ttm_pool.c drm/ttm/pool: Restructure the pool allocation code 2025-01-13 12:58:10 +01:00
ttm_range_manager.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
ttm_resource.c drm/ttm: Balance ttm_resource_cursor_init() and ttm_resource_cursor_fini() 2025-01-13 12:58:10 +01:00
ttm_sys_manager.c drm/ttm: add back a reference to the bdev to the res manager 2022-01-26 15:29:24 +01:00
ttm_tt.c drm/ttm: Move swapped objects off the manager's LRU list 2024-10-09 13:41:30 +02:00