omap_gem_pin(9)
π omap_gem_pin β a Kernel API Manual moment π
okay so bestie, welcome to omap_gem_pin(9), straight out of the Kernel API Manual. this is the function you call when you need your GEM object to stay put in memory. very main character energy, no cap.
β¨ NAME β¨
omap_gem_pin β pin a GEM object in memory π
β¨ SYNOPSIS β¨
int omap_gem_pin (struct drm_gem_object *obj , dma_addr_t *dma_addr );
β¨ ARGUMENTS β¨
objβ the GEM object, the whole reason we're here πdma_addrβ the DMA address π¦
β¨ DESCRIPTION β¨
so what this does is: it pins the given GEM object in memory, and then it fills the dma_addr pointer with that object's DMA address. that's the whole vibe. π«Ά
and the juicy part β if the buffer is not physically contiguous, it will be remapped through the TILER so you get a contiguous view instead. literally the TILER out here doing the most so things line up. slay π₯
pins are reference-counted, meaning calling this function multiple times is allowed β as long as the corresponding omap_gem_unpin calls are balanced. ok so that's the rule, fr fr: pin it, then unpin it the same number of times. don't leave your pins unbalanced or it's giving π.
quick vibe check: returns 0 on success, or a negative error code otherwise. so if you get a negative number back, that's your cue to look away slowly π
π SEE ALSO π
- kernel file
./drivers/gpu/drm/omapdrm/omap_gem.c omap_gem_fault(9)omap_gem_dumb_create(9)omap_gem_dumb_map_offset(9)omap_gem_unpin_locked(9)omap_gem_unpin(9)
and that's the page, bestie π this little slice of the Kernel API Manual came from ./drivers/gpu/drm/omapdrm, dated October 2026, and it's titled omap_gem_pin(9) β 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