ttm_bo_vmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a struct iosys_map that 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:


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