STRUCT DRM_GEM_CHANGE_HANDLE(9)
π 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:
- Kernel file
./tools/perf/trace/beauty/include/uapi/drm/drm.h struct drm_gem_close(9),struct drm_gem_flink(9),struct drm_gem_open(9)DRM_CAP_DUMB_BUFFER(9),DRM_CAP_VBLANK_HIGH_CRTC(9),DRM_CAP_DUMB_PREFERRED_DEPTH(9),DRM_CAP_DUMB_PREFER_SHADOW(9),DRM_CAP_PRIME(9),DRM_PRIME_CAP_IMPORT(9),DRM_PRIME_CAP_EXPORT(9),DRM_CAP_TIMESTAMP_MONOTONIC(9),DRM_CAP_ASYNC_PAGE_FLIP(9),DRM_CAP_CURSOR_WIDTH(9),DRM_CAP_CURSOR_HEIGHT(9),DRM_CAP_ADDFB2_MODIFIERS(9),DRM_CAP_PAGE_FLIP_TARGET(9),DRM_CAP_CRTC_IN_VBLANK_EVENT(9),DRM_CAP_SYNCOBJ(9),DRM_CAP_SYNCOBJ_TIMELINE(9),DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP(9)DRM_CLIENT_CAP_STEREO_3D(9),DRM_CLIENT_CAP_UNIVERSAL_PLANES(9),DRM_CLIENT_CAP_ATOMIC(9),DRM_CLIENT_CAP_ASPECT_RATIO(9),DRM_CLIENT_CAP_WRITEBACK_CONNECTORS(9),DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT(9),DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE(9)struct drm_syncobj_eventfd(9)DRM_IOCTL_GEM_CLOSE(9),DRM_IOCTL_PRIME_HANDLE_TO_FD(9),DRM_IOCTL_PRIME_FD_TO_HANDLE(9),DRM_IOCTL_MODE_RMFB(9),DRM_IOCTL_MODE_CREATE_DUMB(9),DRM_IOCTL_MODE_GETFB2(9),DRM_IOCTL_SYNCOBJ_EVENTFD(9),DRM_IOCTL_MODE_CLOSEFB(9),DRM_IOCTL_SET_CLIENT_NAME(9),DRM_IOCTL_GEM_CHANGE_HANDLE(9)struct drm_event(9),DRM_EVENT_VBLANK(9),DRM_EVENT_FLIP_COMPLETE(9),DRM_EVENT_CRTC_SEQUENCE(9)
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
- 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