ttm_bo_vmap(9)
π ttm_bo_vmap(9) β Kernel API Manual π
okay bestie, welcome to the ttm_bo_vmap page β it's from the Kernel API Manual and it's honestly a short one, so let's get into it β¨
πΈ NAME πΈ
ttm_bo_vmap β (yeah the original leaves this bit blank, bestie, no plot twist, it literally just says the name and dips π)
π¦ SYNOPSIS π¦
int ttm_bo_vmap (struct ttm_buffer_object *bo , struct iosys_map *map );
like, that's the whole signature, no cap π«Ά
β¨ ARGUMENTS β¨
boβ the buffer object. the main character of this whole situation, lowkey πmapβ a pointer to astruct iosys_mapthat represents the map. yes it's a pointer, and yes it's giving pass-by-reference energy π
π DESCRIPTION π
so what does it even do? it sets up a kernel virtual mapping to the data in the buffer object β using ioremap or vmap to get there. iconic behaviour fr fr π₯
the parameter map is where the virtual address comes back out at you, as a struct iosys_map. so that's literally the whole point of passing it in β¨
β οΈ bestie listen β when you're done, you must unmap the buffer with ttm_bo_vunmap. don't leave it hanging, that's not the vibe π
and the return values, because we always check our returns in this house:
-ENOMEMβ out of memory π-EINVALβ invalid range π©
π SEE ALSO π
the kernel file for all this lives at ./drivers/gpu/drm/ttm/ttm_bo_util.c, and the whole extended friend group is:
ttm_move_memcpy(9)ttm_bo_move_memcpy(9)ttm_buffer_object_transfer(9)ttm_io_prot(9)ttm_bo_kmap_try_from_panic(9)ttm_bo_kmap(9)ttm_bo_kunmap(9)ttm_bo_vunmap(9)ttm_bo_move_accel_cleanup(9)ttm_bo_move_sync_cleanup(9)ttm_bo_pipeline_gutting(9)ttm_lru_walk_for_evict(9)ttm_bo_lru_cursor_fini(9)ttm_bo_lru_cursor_init(9)ttm_bo_lru_cursor_next(9)ttm_bo_lru_cursor_first(9)ttm_bo_shrink(9)ttm_bo_shrink_suitable(9)ttm_bo_shrink_avoid_wait(9)
okay that's the page!! π this one came from ./drivers/gpu/drm/ttm, dated October 2026, and ngl it ate β short, sweet, straight to the point. go unmap your buffers, bestie, ily π«Άππ
π¦ 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