drm_send_event_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_send_event_locked(9) β€” the "you already got the lock, bestie" edition

okay so this is a page from the Kernel API Manual, and the star of the show is literally drm_send_event_locked(9). yes bestie, the one with _locked in the name β€” that suffix is the whole vibe check here, iykyk 🫢


✨ NAME ✨

drm_send_event_locked β€” send a DRM event to a file descriptor. that's it, that's the job, and it does it beautifully πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

void drm_send_event_locked (struct drm_device *dev , struct
drm_pending_event *e );

like, look at her. two args, no return value, complete main character energy ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the DRM device. your actual graphics thing, the whole reason we're here πŸ’œ
  • e β€” the DRM event to deliver. this is the lil message you're yeeting out to userspace 🧚

🌸 DESCRIPTION 🌸

so what this function does is it takes the event e β€” which you already initialized with drm_event_reserve_init, no cap β€” and it sends it to its associated userspace DRM file. slay πŸ’…

⚠️ but here's the one thing you CANNOT skip: callers must already hold drm_device.event_lock before calling this. like, already. in advance. this function will not do it for you. if you want the unlocked version, go see drm_send_event instead β€” that's literally its whole thing.

and the good news? the core will take care of unlinking and disarming events when the corresponding DRM file gets closed. so drivers do not need to worry about whether the DRM file for this event still exists β€” you can just call this function upon completion of the asynchronous work unconditionally. no checks, no anxious little if (file) glances, none of that. the core handles it, periodt πŸ”₯πŸ‘‘


🧚 SEE ALSO 🧚

the whole friend group, all together, all iconic:


okay that's the page!! live laugh love, hold your locks, and go read the unlocked version if you're not already holding event_lock πŸ’€πŸŒΈ

this lil gem lives in ./drivers/gpu/drm, dated October 2026, and it goes by drm_send_event_locked(9). mwah, bye bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from