drm_gem_obje...sts_unlocked(9)
π NAME π
drm_gem_object_handle_get_if_exists_unlocked β bestie, this grabs you a reference on a user-space handle if there even is one π«Ά
okay so real talk, this is a kernel API page (Kernel API Manual), and we're talking about the drm_gem_object_handle_get_if_exists_unlocked(9) function. yes the name is a mouthful. no we are not changing it. periodt.
β¨ SYNOPSIS β¨
bool drm_gem_object_handle_get_if_exists_unlocked (struct drm_gem_object
*obj );
π ARGUMENTS π
objβ the GEM object, your main character for this whole function π¦
πΈ DESCRIPTION πΈ
So here's the vibe: this function acquires a reference on the GEM buffer object's handle. That reference is literally required to keep the GEM object alive β no reference, no object, that's just how it is ngl π
When you're done with it, you call drm_gem_object_handle_put_if_exists_unlocked to release the reference. don't ghost it, actually put it back π
And here's the cute part: if the buffer object has no handle, this function does nothing. no drama, no error, just vibes π
β RETURN β
Trueif a handle exists πfalseotherwise π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_gem.c β that's where the magic lives, iykyk.
and now, the group chat roll call πβ¨ every single one of these iconic friends:
drm_gem_huge_mnt_create(9)drm_gem_init(9)drm_gem_object_init(9)drm_gem_private_object_init(9)drm_gem_private_object_fini(9)drm_gem_object_handle_free(9)drm_gem_object_handle_put_unlocked(9)drm_gem_handle_delete(9)drm_gem_dumb_map_offset(9)drm_gem_handle_create_tail(9)drm_gem_handle_create(9)drm_gem_free_mmap_offset(9)drm_gem_create_mmap_offset_size(9)drm_gem_create_mmap_offset(9)drm_gem_get_pages(9)drm_gem_put_pages(9)drm_gem_objects_lookup(9)drm_gem_object_lookup(9)drm_gem_dma_resv_wait(9)drm_gem_open(9)drm_gem_release(9)drm_gem_object_release(9)drm_gem_object_free(9)drm_gem_vm_open(9)drm_gem_vm_close(9)drm_gem_mmap_obj(9)drm_gem_get_unmapped_area(9)drm_gem_mmap(9)drm_gem_lock_reservations(9)drm_gem_lru_init(9)drm_gem_lru_remove(9)drm_gem_lru_move_tail_locked(9)drm_gem_lru_move_tail(9)drm_gem_lru_scan(9)drm_gem_evict_locked(9)
and that's the whole page, bestie πβ¨
cute lil sign-off time π this one came from ./drivers/gpu/drm, dated October 2026, and yes it's still drm_gem_obje...sts_unlocked(9) in the corner because the name got truncated and we're keeping it π
slay.
π¦ 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