drm_gem_prime_export(9)
β¨ drm_gem_prime_export(9) β¨
okay so bestie, welcome to the Kernel API Manual π
β today we're looking at drm_gem_prime_export, and honestly? it's giving "small function, big responsibilities." Let's get into it π
πΈ NAME πΈ
drm_gem_prime_export β the helper library's implementation of the export callback, no cap π«Ά
β SYNOPSIS β
struct dma_buf * drm_gem_prime_export (struct drm_gem_object *obj , int
flags );
like, that's the whole signature. short and iconic β¨
π¦ ARGUMENTS π¦
objβ the GEM object we're exporting, bestie. that's the one πflagsβ flags likeDRM_CLOEXECandDRM_RDWRπ«
π DESCRIPTION π
So this is the implementation of the drm_gem_object_funcs.export functions for GEM drivers that are using the PRIME helpers. periodt.
It gets used as the default in drm_gem_prime_handle_to_fd β so if you're a GEM driver riding with the PRIME helpers, this is lowkey the one doing the work for you π
π₯ SEE ALSO π₯
- the 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_prime_get_contiguous_size(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)
like, that's a whole friend group right there π go read them, iykyk π
β¨ sign-off time β¨
this lil page lives in ./drivers/gpu/drm, dated October 2026 β and it's the drm_gem_prime_export(9) page, obviously π
bye bestie, go export something iconic ππ
π¦ 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