drm_gem_dma_dumb_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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