STRUCT DRM_GEM_CHANGE_HANDLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_gem_change_handle(9) πŸ’…

okay bestie, welcome to the <pink>Kernel API Manual</pink> ✨ β€” this page is literally all about struct drm_gem_change_handle(9) and it's lowkey iconic. it's short, it's sweet, it's giving "small struct, big glow-up energy" πŸŽ€


🌸 NAME 🌸

struct drm_gem_change_handle β€” the argument struct for the &DRM_IOCTL_GEM_CHANGE_HANDLE ioctl. that's it, that's the whole vibe 🫢


✨ SYNOPSIS ✨

struct drm_gem_change_handle {
    __u32 handle;
    __u32 new_handle;
 };

look at her. two __u32s and a dream 😭 remember the struct definition is exactly this, spacing and all β€” don't go "fixing" it, bestie, that's not the assignment πŸ’€


πŸ¦‹ Members πŸ¦‹

  • handle β€” the handle of a gem object. the OG, the one you currently have, the main character before the name change πŸ‘‘
  • new_handle β€” an available gem handle. this one has to be free, like an empty seat at the lunch table 🌸

πŸ”₯ Description πŸ”₯

so here's the tea β˜•: this ioctl changes the handle of a GEM object to the one you specified. yes, a whole rebrand. new name, same object πŸ’…

⚠️ the new handle must be unused. no cap, that's a hard requirement β€” obviously don't try to hand it a handle that's already taken πŸ™ˆ

on success the old handle is closed, and after that literally all further IOCTL calls should refer to the new handle only. the old one? gone. moved on. blocked. ✌️

and here's the cute part πŸ₯° β€” calls to DRM_IOCTL_PRIME_FD_TO_HANDLE will return the new handle. so everything stays consistent, no leftover confusion, we love a clean transition ✨ periodt.


πŸŽ€ SEE ALSO πŸŽ€

okay this list is long and honestly kind of iconic β€” grab a snack πŸ“, here's the whole crew:


and that's the whole page, bestie πŸ§šπŸ’œ source path is ./tools/perf/trace/beauty/incl... and it's dated October 2026 β€” so go forth, change those handles, and remember: the new handle must be unused, or it's giving chaos 😭✨

πŸ“¦ where this page comes from