drm_gem_dma_dumb_create(9)
π drm_gem_dma_dumb_create(9) β Kernel API Manual, but make it cute
okay so bestie, this is a page from the Kernel API Manual (the manual name is literally drm_gem_dma_dumb_create(9), say that five times fast π«Ά) and it's about making a dumb buffer object. Yes. That's the actual technical term. Not me being shady. Periodt.
β¨ NAME β¨
drm_gem_dma_dumb_create β create a dumb buffer object π
β¨ SYNOPSIS β¨
int drm_gem_dma_dumb_create (struct drm_file *file_priv , struct
drm_device *drm , struct drm_mode_create_dumb *args );
β¨ ARGUMENTS β¨
file_privβ the DRM file-private structure you're creating the dumb buffer for. it's giving "your personal little file handle" energy πdrmβ the DRM device. the main character, obviously πargsβ the IOCTL data. that's the payload, the whole vibe check of the call πΈ
β¨ DESCRIPTION β¨
so here's the tea: this function computes the pitch of the dumb buffer and then rounds it up to an integer number of bytes per pixel. that's it, that's the job, and it ate π
if your driver is for hardware that doesn't have any additional restrictions on the pitch, you can literally just use this function directly as your drm_driver.dumb_create callback. no notes. iconic. β
but if your hardware does have additional restrictions? then drivers can adjust the fields that userspace set up, and pass the IOCTL data along to the drm_gem_dma_dumb_create_internal function. lowkey a two-step, but it works π¦
β¨ RETURN β¨
0 on success, or a negative error code on failure. no in-between, bestie β it either slays or it doesn't π
β¨ SEE ALSO β¨
Kernel file ./drivers/gpu/drm/drm_gem_dma_helper.c and dma helpers(9), plus the whole friend group:
__drm_gem_dma_create(9)drm_gem_dma_create(9)drm_gem_dma_create_with_handle(9)drm_gem_dma_free(9)drm_gem_dma_dumb_create_internal(9)drm_gem_dma_get_unmapped_area(9)drm_gem_dma_print_info(9)drm_gem_dma_get_sg_table(9)drm_gem_dma_prime_import_sg_table(9)drm_gem_dma_vmap(9)drm_gem_dma_mmap(9)drm_gem_dma_prime_import_sg_table_vmap(9)
ngl the "dumb buffer" name is not a read, it's a whole lifestyle. don't come for it π
and that's the page, bestie π this lil drop came from the source dir ./drivers/gpu/drm, dated October 2026, and the whole thing signs off under the name drm_gem_dma_dumb_create(9) β mwah, go create some buffers πβ¨
π¦ 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