STRUCT VMW_BO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 from cpu_writers because 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 shows detached_resources, is_dumb and dumb_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 πŸ’œ

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