drm_prime_g...tiguous_size(9)
π drm_prime_g...tiguous_size(9) π
okay so this is a page straight out of the Kernel API Manual, bestie β yes it's a real manual, no it's not the kind you read for fun, but we're gonna make it fun anyway π«Ά
β¨ NAME β¨
drm_prime_get_contiguous_size β literally returns the contiguous size of the buffer π
that's it that's the whole vibe
πΈ SYNOPSIS πΈ
unsigned long drm_prime_get_contiguous_size (struct sg_table *sgt );
π ARGUMENTS π
sgtβ thesg_tablethat describes the buffer you wanna check, bestie. this is the thing that's getting inspected. it's giving "receipts" energy π§Ύ
π¦ DESCRIPTION π¦
okay so here's the tea β β this little helper calculates the contiguous size in the DMA address space of the buffer that's described by the sg_table you handed it. no cap, that's its whole job.
and why do we care?? because this is useful for implementing drm_gem_object_funcs.gem_prime_import_sg_table, that's why π« so if you're sitting there like "when would i even need this" β that's when. iconic use case, honestly π
π SEE ALSO π
the whole friend group, in the order the page says it, because we don't do favorites here π«Ά
Kernel file ./drivers/gpu/drm/drm_prime.coverview and lifetime rules(9)drm_gem_dmabuf_export(9)drm_gem_dmabuf_release(9)drm_gem_prime_fd_to_handle(9)drm_gem_prime_handle_to_dmabuf(9)drm_gem_prime_handle_to_fd(9)PRIME Helpers(9)drm_gem_map_attach(9)drm_gem_map_detach(9)drm_gem_map_dma_buf(9)drm_gem_unmap_dma_buf(9)drm_gem_dmabuf_vmap(9)drm_gem_dmabuf_vunmap(9)drm_gem_prime_mmap(9)drm_gem_dmabuf_mmap(9)drm_prime_pages_to_sg(9)drm_gem_prime_export(9)drm_gem_is_prime_exported_dma_buf(9)drm_gem_prime_import_dev(9)drm_gem_prime_import(9)drm_prime_sg_to_page_array(9)drm_prime_sg_to_dma_addr_array(9)drm_prime_gem_destroy(9)
lowkey obsessed with how many cross-references that is. go read the links, bestie, iykyk πβ¨
and that's a wrap, gorgeous π this page lives under ./drivers/gpu/drm and it's dated October 2026 β so if you ever need to cite it, that's the receipt π§Ύ slay, bye ππ
π¦ 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