ttm_resource_manager_first(9)
π ttm_resource_manager_first β it's giving "start of the resource iterator" β¨
Okay bestie, we're in the Linux Kernel API Manual today, and this page is literally about ttm_resource_manager_first(9) β the glow-up that kicks off your whole loop over a resource manager's resources. Buckle up π
β¨ NAME β¨
ttm_resource_manager_first β no cap, this is the one that starts iterating over the resources of a resource manager. Main character energy for your for-loop π
πΈ SYNOPSIS πΈ
struct ttm_resource * ttm_resource_manager_first (struct
ttm_resource_cursor *cursor );
π¦ ARGUMENTS π¦
cursorβ the cursor, bestie. It's the lil guy that records the position so you don't get lost in the sauce while iterating π«Ά
π§ DESCRIPTION π§
So here's the vibe: this function initializes the cursor and starts iterating. That's it, that's the whole moment β¨
β οΈ But listen β when you're done iterating, the caller must explicitly call ttm_resource_cursor_fini. Not "should", not "maybe", must. Don't leave your cursor hanging, it's not cute π
π₯ RETURN π₯
The first resource from the resource manager. Literally the first one. You ate, first resource, slay π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/ttm/ttm_resource.c β and like, the whole squad honestly:
ttm_resource_cursor_init(9)ttm_resource_cursor_fini(9)ttm_lru_bulk_move_init(9)ttm_lru_bulk_move_fini(9)ttm_lru_bulk_move_tail(9)ttm_resource_init(9)ttm_resource_fini(9)ttm_resource_try_charge(9)ttm_resource_intersects(9)ttm_resource_compatible(9)ttm_resource_manager_init(9)ttm_resource_manager_usage(9)ttm_resource_manager_debug(9)ttm_resource_manager_next(9)ttm_lru_first_res_or_null(9)ttm_kmap_iter_iomap_init(9)Linear io iterator(9)ttm_kmap_iter_linear_io_init(9)ttm_kmap_iter_linear_io_fini(9)ttm_resource_manager_create_debugfs(9)ttm_resource_manager_dmem_reclaim(9)ttm_resource_manager_set_dmem_region(9)
Okay that's the whole page, bestie, go iterate responsibly π β¨
Signed, sealed, delivered from ./drivers/gpu/drm/ttm, dated October 2026 β the Kernel API Manual said it, not me ππ¦
π¦ 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