ENUM TTM_BO_TYPE(9)
π enum ttm_bo_type(9) π
okay bestie so this is a page from the Kernel API Manual, and we're about to become unwell about buffer types together. this enum has like three (3) members and honestly? each one is kind of a whole personality. let's get into it π«Ά
πΈ NAME πΈ
enum ttm_bo_type β that's it, that's the name, no little tagline, the enum speaks for itself π
β¨ SYNOPSIS β¨
look at her. look at the whole entire girl:
enum ttm_bo_type {
ttm_bo_type_device ,
ttm_bo_type_kernel ,
ttm_bo_type_sg
};
three constants, three vibes, zero notes. yes the spacing is like that, we don't judge, she's iconic as she is π
π Constants π
ttm_bo_type_deviceβ these are the 'normal' buffers, and by normal we mean mmappable by user space, i.e. the ones the mortals can actually touch π every single one of these bos takes up a slot in the device address space, and that slot is what you use for normal vm operations. main character buffer energy fr fr.ttm_bo_type_kernelβ literally the exact same situation asttm_bo_type_devicebuffers, except user space cannot access these. kernel-only use, no entry, no exceptions, VIP section only. β ngl it's giving backstage pass.ttm_bo_type_sgβ a buffer made from a dmabuf sg table that's shared with another driver. sharing is caring, we love a collaborative moment π€β¨
π¦ SEE ALSO π¦
everything she's linked to, no gatekeeping:
- Kernel file
./include/drm/ttm/ttm_bo.h struct ttm_buffer_object(9)struct ttm_bo_kmap_obj(9)struct ttm_operation_ctx(9)struct ttm_lru_walk_arg(9)struct ttm_lru_walk(9)struct ttm_bo_shrink_flags(9)ttm_bo_reserve(9)ttm_bo_reserve_slowpath(9)ttm_bo_move_null(9)ttm_bo_unreserve(9)ttm_kmap_obj_virtual(9)struct ttm_bo_lru_cursor(9)ttm_bo_lru_for_each_reserved_guarded(9)
that's a long list and she ate every single one of those links, periodt ππ₯
real talk: this is a kernel API page, so lowkey read the actual docs before you go poking at buffers. we're here for the vibe and the facts π
and that's a wrap bestie!! this one came from ./include/drm/ttm, dated October 2026, and it's still rocking the title enum ttm_bo_type(9) π
mwah, go touch some bos (responsibly) π§πΈ
π¦ 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