drm_gem_object_get(9)
π drm_gem_object_get(9) π
okay so bestie, welcome to the Kernel API Manual β¨ today's main character is drm_gem_object_get(9) and honestly she's a tiny little function with one job and she does it flawlessly π
β¨ NAME β¨
drm_gem_object_get β acquire a GEM buffer object reference π«Ά
πΈ SYNOPSIS πΈ
void drm_gem_object_get (struct drm_gem_object *obj );
that's it. that's the whole vibe check. void in, void out, reference acquired π
π¦ ARGUMENTS π¦
objβ the GEM buffer object, aka the little guy you're about to hold onto for dear life π₯Ί
β DESCRIPTION β
okay so here's the tea β β this function acquires an additional reference to obj. one more ref, bestie. you're now officially holding a stake in it β¨
but likeβ¦ it is illegal to call this without already holding a reference π no cap, that's not a vibe, that's a bug. you gotta already have one in your hand before you go grabbing more.
the good news?? No locks required. π literally none. zero. go off, no mutex needed, it's giving effortless π
π SEE ALSO π
the whole friend group, fr fr β all of these live in the kernel file ./include/drm/drm_gem.h:
enum drm_gem_object_status(9)struct drm_gem_object_funcs(9)struct drm_gem_lru(9)struct drm_gem_object(9)DRM_GEM_FOPS(9)DEFINE_DRM_GEM_FOPS(9)drm_gem_get_huge_mnt(9)drm_gem_object_put(9)β the one who lets go π the breakup arcdrm_gem_object_is_shared_for_memory_stats(9)drm_gem_is_imported(9)drm_gem_gpuva_init(9)drm_gem_for_each_gpuvm_bo(9)drm_gem_for_each_gpuvm_bo_safe(9)
and that's the whole page, bestie π§π sourced straight from ./include/drm, dated October 2026, page drm_gem_object_get(9) β slay, ate, no crumbs left πΈπ
π₯
π¦ 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