STRUCT VMW_PITER(9)
π struct vmw_piter(9) β okay bestie, let's talk page iterators
So this is a kernel API manual page, and the star of the show is struct vmw_piter β literally a page iterator that iterates over a list of pages and DMA addresses that could be either a scatter-gather list or arrays. Both? Yes. It's giving flexible. π¦
β¨ SYNOPSIS β¨
struct vmw_piter {
struct page **pages;
const dma_addr_t *addrs;
struct sg_dma_page_iter iter;
unsigned long i;
unsigned long num_pages;
bool (*next)(struct vmw_piter *);
dma_addr_t (*dma_address)(struct vmw_piter *);
};
Look at that struct. Immaculate. No notes. π
π Members π
Okay so here's the breakdown of every single field, no skipping, we're doing this properly:
pagesβ array of page pointers pointing at the pages. Yep, that's the whole vibe. π«Άaddrsβ the DMA addresses to the pages, but only if coherent pages are being used. Conditional queen.iterβ a scatter-gather page iterator. Basically it's tracking the current position in the SG list. Main character energy for the SG walk. πiβ current position in the arrays. Your little index bestie.num_pagesβ the number of pages total. The whole count. βnextβ a function that advances the iterator. Returnsfalseif it's past the list of pages,trueotherwise. So like,false= you've wandered off the end,true= there's more, keep going. πdma_addressβ a function that returns the DMA address of the current page. Handy. Iconic. Necessary.
π₯ SEE ALSO π₯
Kernel file ./drivers/gpu/drm/vmwgfx/vmwgfx_drv.h and honestly a whole friend group of references β here's every single one because we do not leave anyone out at this party:
struct vmw_resource(9)struct vmw_surface_metadata(9)struct vmw_surface(9)struct vmw_res_cache_entry(9)enum vmw_dma_map_mode(9)struct vmw_sg_table(9)struct vmw_sw_context(9)enum vmw_sm_type(9)has_sm4_context(9)has_sm4_1_context(9)has_sm5_context(9)has_gl43_context(9)vmw_resource_mob_attached(9)vmw_fifo_caps(9)vmw_is_cursor_bypass3_enabled(9)vmw_piter_next(9)vmw_piter_dma_addr(9)vmw_piter_page(9)struct vmw_diff_cpy(9)VMW_DEBUG_USER(9)VMW_DEBUG_KMS(9)vmw_fifo_mem_read(9)vmw_fifo_mem_write(9)
Like, that's a full roster. Go read them. Iykyk. π
Also worth saying out loud: this whole page lives in ./drivers/gpu/drm/vmwgfx, and it's dated October 2026. So yeah β future-dated documentation, kind of iconic of it. π§
And that's the page, bestie β that's the whole thing, from the Kernel API Manual down to the last cross-reference. Now go write your iterator. Slay. πππΈ
π¦ 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