ttm_tt_init(9)
β¨ ttm_tt_init(9) β¨
okay bestie, so this is a page straight out of the Kernel API Manual (yes, that's the manual name, we're doing kernel internals today, buckle up) π and it's about a little function called ttm_tt_init. she's short, she's sweet, she has no NAME description and honestly? iconic of her.
πΈ NAME πΈ
ttm_tt_init β (and that's literally it, the description line is empty, the man page is being mysterious and giving nothing, we love a cryptic queen) π
β SYNOPSIS β
int ttm_tt_init (struct ttm_tt *ttm , struct ttm_buffer_object *bo ,
uint32_t page_flags , enum ttm_caching caching , unsigned long
extra_pages );
five arguments, one int coming back at you, no cap. π₯
π ARGUMENTS π
ttmβ thestruct ttm_tt. that's the thing. the star of the show. she's the whole point of this function, bestie.boβ the buffer object we create the ttm for. your ttm needs a bo like you need your iced coffee. βpage_flagsβ page flags as identified by theTTM_TT_FLAG_XXflags. XX like the flags, not likeβ¦ anything else, bestie. πcachingβ the desired caching state of the pages. it's giving "how do you want your pages cached" energy.extra_pagesβ extra pages needed for the driver. yes, extra. a little bonus. a lil treat. π
π¦ DESCRIPTION π¦
so the vibe here is: you create a struct ttm_tt to back data with system memory pages. that's it, that's the job. β¨
but β and this is the part where I need you to pay attention, bestie β no pages are actually allocated. zero. none. the ttm is out here full of potential and absolutely no follow-through. it's giving "I'll do it later" energy, and honestly? valid. ππ
π RETURN π
NULL: out of memory. that's the whole list. one (1) sad return value, and it's the bad one. if you seeNULL, the memory said "no β€οΈ". π«Ά
π SEE ALSO π
okay this is the friend group, the whole squad, the linkage, if you will. all of these live in the kernel file ./include/drm/ttm/ttm_tt.h:
struct ttm_tt(9)struct ttm_kmap_iter_tt(9)ttm_tt_is_swapped(9)ttm_tt_is_backed_up(9)ttm_tt_clear_backed_up(9)ttm_tt_create(9)ttm_tt_fini(9)ttm_tt_destroy(9)ttm_tt_swapin(9)ttm_tt_populate(9)ttm_tt_unpopulate(9)ttm_tt_mark_for_clear(9)struct ttm_backup_flags(9)ttm_agp_tt_create(9)
go read those next, iykwimaityd ππ§
PSA: this page came from the ./include/drm/ttm directory and it's dated October 2026 β yes, the future, don't question it, she's ahead of her time β slay, and that's the whole man page, mwah πβ¨
π¦ 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