STRUCT TTM_RESOURCE_CURSOR(9)
πΈ NAME πΈ
struct ttm_resource_cursor β bestie, it's literally the cursor struct for iterating over the resources in a manager β¨ (yeah the original NAME line is kinda shy and gives you nothing else, so that's the whole vibe, iykyk π
)
π SYNOPSIS π
struct ttm_resource_cursor {
struct ttm_resource_manager *man;
struct ttm_lru_item hitch;
struct list_head bulk_link;
struct ttm_lru_bulk_move *bulk;
unsigned int mem_type;
unsigned int priority;
};
π Members π
manβ the resource manager you're currently iterating over, main character of the traversal π«Άhitchβ a hitch list node, and the way it works is it gets inserted before the next resource you're gonna iterate over. Lowkey iconic bookmarking behavior πbulk_linkβ a list link for the list of cursors that are traversing the bulk sublist ofbulk. It's protected by the ttm device'slru_lockπ (yes, the lock, respect it)bulkβ pointer to thestruct ttm_lru_bulk_movewhose subrangehitchis inserted into. It'sNULLif there isn't one. π¨ Never dereference this pointer β thestruct ttm_lru_bulk_moveobject it points to might have already been freed π. The pointer is only for comparison, nothing else, periodt.mem_typeβ the memory type of the LRU list you're traversing. Heads up: this field is only valid iffbulk != NULLβpriorityβ the current priority, that's it, that's the field π
π¦ Description π¦
It's a cursor π« β you use it to iterate over the resources in a manager. That's the whole job and honestly it ate.
π SEE ALSO π
Kernel file ./include/drm/ttm/ttm_resource.h, TTM_NUM_MOVE_FENCES(9), enum ttm_lru_item_type(9), struct ttm_lru_item(9), ttm_lru_item_init(9), struct ttm_resource_manager(9), struct ttm_bus_placement(9), struct ttm_resource(9), ttm_lru_item_to_res(9), struct ttm_lru_bulk_move_pos(9), struct ttm_lru_bulk_move(9), struct ttm_kmap_iter_iomap(9), struct ttm_kmap_iter_linear_io(9), ttm_resource_manager_set_used(9), ttm_resource_manager_used(9), ttm_resource_manager_cleanup(9), ttm_resource_manager_for_each_res(9)
ok that's the whole page bestie, go forth and iterate responsibly π§ββοΈπ
mwah π β this one lives in ./include/drm/ttm, dated October 2026, and it's filed under struct ttm_resource_cursor(9). slay β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms