drm_gem_object_lookup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


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