STRUCT DRM_EVENT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct drm_event(9) ✨

okay bestie, welcome to the struct drm_event page from the Kernel API Manual πŸ’… this is the little header that makes DRM events happen, and honestly? it's giving main character energy for something so smol πŸŽ€


🌸 NAME 🌸

struct drm_event β€” the header for DRM events πŸ¦‹


⭐ SYNOPSIS ⭐

struct drm_event {
    __u32 type;
    __u32 length;
 };

like, that's it. two fields. iconic minimalism πŸ’–


🫢 Members 🫢

  • type β€” the event type, i.e. what kind of event this lil guy is πŸ‘‘
  • length β€” the total number of payload bytes, including the header itself πŸ”₯ (yes bestie, header counts too, don't forget it)

πŸ’€ Description πŸ’€

so here's the tea β˜• this struct is a header for events that get written back to user-space on the DRM FD, fr fr.

and a read on the DRM FD will always only return complete events β€” no cap πŸ‘ like, say your read buffer is 100 bytes large and there are two 64 byte events pending. only one of them comes back. the other one waits its turn, lowkey patient of it 😭

now the type numbering, because this part matters:

  • event types 0 - 0x7fffffff are generic DRM events ✨
  • 0x80000000 and up are chipset specific πŸ’…

and the generic DRM events include DRM_EVENT_VBLANK, DRM_EVENT_FLIP_COMPLETE and DRM_EVENT_CRTC_SEQUENCE πŸŽ€ slay.


πŸ¦‹ SEE ALSO πŸ¦‹

everything below is exactly what the page points you at β€” go read them, iykyk 🧚

and that's the whole vibe check bestie πŸ’œ this page came from ./tools/perf/trace/beauty/incl... and it's dated October 2026 β€” so go forth, read your complete events, and stan a two-field struct πŸŒˆβ­πŸ“

πŸ“¦ where this page comes from