drm_gem_shmem_dumb_create(9)
π drm_gem_shmem_dumb_create(9) β like, the shmem dumb-buffer creator, bestie
okay so real talk, this is a page from the Kernel API Manual (the drm_gem_shmem_dumb_create(9) one, yes that one) and honestly? it's kind of a bop. let's get into it β¨
πΈ NAME πΈ
drm_gem_shmem_dumb_create β literally creates a dumb shmem buffer object π
π¦ SYNOPSIS π¦
int drm_gem_shmem_dumb_create (struct drm_file *file , struct drm_device
*dev , struct drm_mode_create_dumb *args );
no cap, that's the whole signature. she's compact, she's iconic π
β¨ ARGUMENTS β¨
fileβ the DRM file structure you're creating the dumb buffer for. it's giving "who's this for" energy π«Άdevβ the DRM device. main character energy fr fr πargsβ the IOCTL data. yes that's it, that's the whole description, we move πββοΈπ¨
π DESCRIPTION π
so what does she actually do? this function computes the pitch of the dumb buffer and rounds it up to an integer number of bytes per pixel. math moment, but make it slay π₯
drivers for hardware that doesn't have any additional restrictions on the pitch can directly use this function as their drm_driver.dumb_create callback. like, plug and play bestie, no notes β¨
for hardware with additional restrictions, drivers can adjust the fields set up by userspace before calling into this function. so you get to pre-game it a lil bit before the actual call ππ
β RETURN β
0 on success, or a negative error code on failure. that's it. that's the vibe check π (negative = not it, bestie π)
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_gem_shmem_helper.coverview(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_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_sg_table(9)drm_gem_shmem_prime_import_no_map(9)
like, the whole friend group. iykyk π§ββοΈπ
ngl bestie, there's noOPTIONS, noEXAMPLES, noBUGS, noAUTHOR, noCOPYRIGHTsection on this one β so if you were waiting for the usual suspects, they are not here. don't come for me, come for the source π
and that's the whole page!! mwah π source is ./drivers/gpu/drm, dated October 2026 β xoxo, your fav kernel bestie, periodt ππ«ΆπΈ
π¦ 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