STRUCT VMW_BO(9)
π struct vmw_bo(9) π
okay so this is the struct vmw_bo page from the Kernel API Manual β yes bestie, the actual kernel API manual, and yes we're reading it for fun, don't @ me β¨
π NAME π
struct vmw_bo β it's a TTM buffer object, but make it vmwgfx-flavoured π like the base model got a full glow-up with extra stuff bolted on.
πΈ SYNOPSIS πΈ
struct vmw_bo {
struct ttm_buffer_object tbo;
struct ttm_placement placement;
struct ttm_place places[5];
struct ttm_bo_kmap_obj map;
struct rb_root res_tree;
u32 res_prios[TTM_MAX_BO_PRIORITY];
struct xarray detached_resources;
atomic_t map_count;
atomic_t cpu_writers;
struct vmw_resource *dx_query_ctx;
struct vmw_bo_dirty *dirty;
bool is_dumb;
struct vmw_surface *dumb_surface;
};
look at all those fields, she's stacked π«Ά (literally, it's a struct, that's the joke, iykyk)
π¦ Members π¦
tboβ the TTM buffer object itself, the whole reason we're here π«placementβ the preferred placement for this buffer object, like its dream address, manifesting β¨placesβ the chosen places for the preferred placement. that's the actual picks, not just the wishlist πmapβ the kmap object, holding down the semi-persistent mappings πres_treeβ RB tree of resources using this buffer object as a backing MOB π³res_priosβ eviction priority counts for the attached resources, keeping score fr fr πmap_countβ the number of currently active maps. heads up: this one will differ fromcpu_writersbecause it also counts kernel maps π«Άcpu_writersβ number of synccpu write grabs. it's protected by the reservation when it gets increased, but lowkey it may be decreased without the reservation πdx_query_ctxβ the DX context, but only if this buffer object is being used as a DX query MOB π¦dirtyβ the structure for user-space dirty-tracking π
ngl the struct up in the synopsis also showsdetached_resources,is_dumbanddumb_surface, but this page doesn't spell out what those do β so i'm not gonna invent lore for them, that's not the vibe πΈ
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/vmwgfx/vmwgfx_bo.h vmw_bo_prio_add(9)
go read those next bestie, one of them is literally the header file, it's giving "the source of truth" energy π₯
and that's the whole page, periodt π
big kiss to ./drivers/gpu/drm/vmwgfx for shipping it, dated October 2026 β future-coded of them honestly βπ§
π¦ 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