STRUCT VMW_CMDBUF_HEADER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct vmw_cmdbuf_header(9) β€” Kernel API Manual vibes πŸ¦‹

okay so bestie, you know how the kernel docs live in that Kernel API Manual? yeah. this is one of those pages, and it's genuinely iconic once you get the ✨lore✨. we're talking about struct vmw_cmdbuf_header β€” the whole metadata situation for command buffers. lowkey the backbone of the whole vmwgfx command buffer saga. let's get into it πŸ’…


✨ NAME ✨

struct vmw_cmdbuf_header β€” Command buffer metadata πŸŽ€

like… it's literally the little info-card attached to your command buffer. the receipts. the ~vibe check~ of the buffer. no cap.


🌸 SYNOPSIS 🌸

struct vmw_cmdbuf_header {
    struct vmw_cmdbuf_man *man;
    SVGACBHeader *cb_header;
    SVGACBContext cb_context;
    struct list_head list;
    struct drm_mm_node node;
    dma_addr_t handle;
    u8 *cmd;
    size_t size;
    size_t reserved;
    bool inline_space;
 };

that's the whole struct, bestie. every field is a main character. scroll down for the individual character arcs πŸ’–


πŸ‘‘ Members πŸ‘‘

  • man β€” The command buffer manager. the boss. the one who runs the whole operation, and this header answers to them 🫢
  • cb_header β€” Device command buffer header, allocated from a DMA pool. it's giving "official document, printed at the fancy DMA pool, not the cheap printer." iconic ✨
  • cb_context β€” The device command buffer context. the situation-setter. the ~context~, literally 🌈
  • list β€” List head for attaching to the manager lists. yes, it gets linked into lists. it has connections. networking era πŸ’…
  • node β€” The range manager node. the little map-dot in the range manager's world πŸ—ΊοΈ
  • handle β€” The DMA address of cb_header. Handed to the device on command buffer submission. like handing over your ID at the door β€” the device needs it, and you do not lose it 😭
  • cmd β€” Pointer to the command buffer space of this buffer. the actual spot where the commands hang out πŸŽ€
  • size β€” Size of the command buffer space of this buffer. the measurements. the dimensions. how much room we're working with πŸ“
  • reserved β€” Reserved space of this buffer. set aside, claimed, do-not-touch territory πŸ™ˆ
  • inline_space β€” Whether inline command buffer space is used. a bool that asks the big question: are we doing this inline or not πŸ‘€

πŸ’œ SEE ALSO πŸ’œ

the Kernel file we're all living in: ./drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c β€” that's the home base, bestie 🏠

and then the friend group β€” here's the whole squad, and yes, every single one made the list:

struct vmw_cmdbuf_context(9), struct vmw_cmdbuf_man(9), struct vmw_cmdbuf_dheader(9), struct vmw_cmdbuf_alloc_info(9), vmw_cmdbuf_cur_lock(9), vmw_cmdbuf_cur_unlock(9), vmw_cmdbuf_header_inline_free(9), __vmw_cmdbuf_header_free(9), vmw_cmdbuf_header_free(9), vmw_cmdbuf_header_submit(9), vmw_cmdbuf_ctx_init(9), vmw_cmdbuf_ctx_submit(9), vmw_cmdbuf_ctx_process(9), vmw_cmdbuf_man_process(9), vmw_cmdbuf_ctx_add(9), vmw_cmdbuf_irqthread(9), vmw_cmdbuf_work_func(9), vmw_cmdbuf_man_idle(9), __vmw_cmdbuf_cur_flush(9), vmw_cmdbuf_cur_flush(9), vmw_cmdbuf_idle(9), vmw_cmdbuf_try_alloc(9), vmw_cmdbuf_alloc_space(9), vmw_cmdbuf_space_pool(9), vmw_cmdbuf_space_inline(9), vmw_cmdbuf_alloc(9), vmw_cmdbuf_reserve_cur(9), vmw_cmdbuf_commit_cur(9), vmw_cmdbuf_reserve(9), vmw_cmdbuf_commit(9), vmw_cmdbuf_send_device_command(9), vmw_cmdbuf_preempt(9), vmw_cmdbuf_startstop(9), vmw_cmdbuf_set_pool_size(9), vmw_cmdbuf_man_create(9), vmw_cmdbuf_remove_pool(9), vmw_cmdbuf_man_destroy(9)

like… 37 references? the way this struct knows everybody 😭πŸ”₯ iykyk.


ngl bestie, if you're poking at command buffer internals without reading vmwgfx_cmdbuf.c first, that's a bold move. go read it. it's giving required reading 🫢

and that's the whole page, periodt πŸ’… this came out of ./drivers/gpu/drm/vmwgfx, dated October 2026 β€” go stan the kernel docs, they're lowkey iconic πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from