drm_ioctl_compat_t(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_ioctl_compat_t(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so this is a kernel API manual page, and honestly? it's a short one but it's lowkey iconic for what it is. let's get into it ✨


🌸 NAME 🌸

drm_ioctl_compat_t β€” the compatibility DRM ioctl function type. periodt. that's the whole name. short king energy πŸ‘‘


✨ SYNOPSIS ✨

here's the literal signature, copy it exactly, no improvising:

typedef int drm_ioctl_compat_t (struct file *filp , unsigned int cmd ,
       unsigned long arg );

it's giving "one typedef, zero drama" πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • filp β€” the file pointer. that's it, that's the whole vibe 🫢
  • cmd β€” the ioctl command code. the actual "what do you want me to do" of it all ✨
  • arg β€” the DRM file this ioctl was made on 🌈

πŸ’– DESCRIPTION πŸ’–

so like, it's just a typedef β€” that's it, no cap. its entire purpose in life is making it easier to declare an array of compatibility handlers, which is honestly such a humble main character move 😭

and here's the tea you actually need: new drivers shouldn't screw up the structure layout for their ioctl structures β€” and because they shouldn't be doing that, they never need this. so if you're writing a shiny new driver, this typedef is not for you, bestie. it's a legacy-handler situation πŸ™ˆ πŸ”₯

lowkey important: the manual doesn't say new drivers can't need it β€” it says they shouldn't screw up the layout, and hence never need it. that's the phrasing, keep it in your heart πŸ’œ

🌟 SEE ALSO 🌟

go read these, they're the friend group:


and that's the pageeee! πŸŽ‰ this one lives under ./include/drm, dated October 2026 β€” mwah, slay, go read the header file next, iykyk πŸ’…πŸΌπŸ’–βœ¨

πŸ“¦ where this page comes from