ttm_bo_populate(9)
β¨ ttm_bo_populate(9) β¨
okay bestie, welcome to the Kernel API Manual entry for ttm_bo_populate β this is a 9th-section kernel function page, so grab your strawberry matcha and let's get into it ππ
πΈ NAME πΈ
ttm_bo_populate β make sure a buffer object actually has backing pages, no cap
π¦ SYNOPSIS π¦
int ttm_bo_populate (struct ttm_buffer_object *bo , struct
ttm_operation_ctx *ctx );
π ARGUMENTS π
boβ the buffer object in question, the main character of this whole function π«Άctxβ thettm_operation_ctxthat's governing the operation, aka the vibe check for how this runs
π DESCRIPTION π
So here's the tea β β for buffer objects that live in a memory type whose manager uses struct ttm_tt for backing pages, this function makes sure those backing pages are present and have valid content. Like, actually there and actually correct. Not fake.
Also, if bo's resource got previously swapped out, it gets placed back onto the correct LRU list. Slay. It's giving "restored to its rightful place" energy π
π₯ RETURN π₯
0if it worked β we love a successful return π- a negative error code on failure β π
π NOTE π
Heads up bestie: this can return-EINTRor-ERESTARTSYSifctx::interruptibleis set totrue. So like, if you signed up for interruptible behaviour, don't be shocked when the interrupts actually interrupt. Foreshadowing, literally.
π SEE ALSO π
Kernel file ./drivers/gpu/drm/ttm/ttm_bo.c, plus the whole friend group:
ttm_bo_move_to_lru_tail(9)ttm_bo_set_bulk_move(9)ttm_bo_eviction_valuable(9)ttm_bo_evict_first(9)ttm_bo_alloc_at_place(9)struct ttm_bo_evict_walk(9)ttm_bo_evict_cgroup(9)ttm_bo_pin(9)ttm_bo_unpin(9)ttm_bo_alloc_resource(9)ttm_bo_validate(9)ttm_bo_init_reserved(9)ttm_bo_init_validate(9)ttm_bo_unmap_virtual(9)ttm_bo_wait_ctx(9)struct ttm_bo_swapout_walk(9)ttm_bo_swapout(9)
and that's the whole page, bestie π§π this came from the ./drivers/gpu/drm/ttm source, October 2026 edition β go forth and populate those pages β¨π
π¦ 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