drm_gem_shm...ort_sg_table(9)
π drm_gem_shmem_prime_import_sg_table(9) π
okay so bestie, welcome to the Kernel API Manual β this one's a (9) page, which is kernel-dev territory, so grab a lil snack and let's go π
β¨ NAME β¨
drm_gem_shmem_prime_import_sg_table β literally the function that produces a shmem GEM object out of another driver's scatter/gather table of pinned pages π
πΈ SYNOPSIS πΈ
struct drm_gem_object * drm_gem_shmem_prime_import_sg_table (struct
drm_device *dev , struct dma_buf_attachment *attach , struct sg_table
*sgt );
no cap, that's the whole signature π
π¦ ARGUMENTS π¦
devβ the Device you're importing into, periodt.attachβ the DMA-BUF attachment, iykyk.sgtβ the scatter/gather table of pinned pages, the main character of this whole operation π
π DESCRIPTION π
so this function imports a scatter/gather table that some other driver exported via DMA-BUF. the way it works is: drivers that use the shmem helpers should set this bad boy as their drm_driver.gem_prime_import_sg_table callback. that's it, that's the vibe check β
β RETURN β
you get back a pointer to a newly created GEM object π« β or, if things go sideways, an ERR_PTR-encoded negative error code on failure π (ngl, always check for that one, bestie).
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_gem_shmem_helper.c overview(9)drm_gem_shmem_init(9)drm_gem_shmem_create(9)drm_gem_shmem_release(9)drm_gem_shmem_free(9)drm_gem_shmem_pin(9)drm_gem_shmem_unpin(9)drm_gem_shmem_create_with_handle(9)drm_gem_shmem_dumb_create(9)drm_gem_shmem_mmap(9)drm_gem_shmem_print_info(9)drm_gem_shmem_get_sg_table(9)drm_gem_shmem_get_pages_sgt(9)drm_gem_shmem_prime_import_no_map(9)
go read them all, fr fr πβ¨
this page lives at ./drivers/gpu/drm in the source tree, and it's dated October 2026. mwah π
okay that's the whole page, you ate that π«Ά from your fave drm_gem_shm...ort_sg_table(9) girlie β 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