drm_gem_object_lookup(9)
β¨ drm_gem_object_lookup(9) β¨
okay bestie, welcome to the Kernel API Manual π
today's main character is drm_gem_object_lookup, and honestly? it's giving "small function, big responsibilities."
π NAME π
drm_gem_object_lookup β look up a GEM object from its handle π¦
πΈ SYNOPSIS πΈ
struct drm_gem_object * drm_gem_object_lookup (struct drm_file *filp ,
u32 handle );
π ARGUMENTS π
filpβ DRM file private date π (yes, that's what the manual says β "date", not "data". we're keeping it exactly as written, no cap.)handleβ userspace handle β¨
π§ DESCRIPTION π§
so here's the tea: if you're looking up an array of handles, use drm_gem_objects_lookup instead. that's it, that's the whole note. lowkey iconic for how brief it is. π
π₯ RETURN π₯
a reference to the object named by the handle if such an object exists on filp. otherwise? NULL. that's the vibe check, and it either slays or it doesn't. π«Ά
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_gem.c, plus the whole friend group:
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_get_if_exists_unlocked(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_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)
that's the whole page, bestie β short, sweet, and straight from ./drivers/gpu/drm. this edition is dated October 2026, and it lives under the Kernel API Manual. go forth and look up those GEM objects responsibly π
π¦ 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