drm_send_ev...stamp_locked(9)
π drm_send_ev...stamp_locked(9) β the Kernel API Manual, bestie edition π
okay so this is a page from the Kernel API Manual, and we're talking about drm_send_event_timestamp_locked β yes the name is a whole mouthful, the header just abbreviates it because apparently even kernel docs get tired π anyway. stick with me, it's actually so good.
β¨ NAME β¨
drm_send_event_timestamp_locked β send a DRM event to a file descriptor, bestie π
π¦ SYNOPSIS π¦
void drm_send_event_timestamp_locked (struct drm_device *dev , struct
drm_pending_event *e , ktime_t timestamp );
πΈ ARGUMENTS πΈ
devβ the DRM device. literally the device. that's the whole vibe π«Άeβ the DRM event you want to deliver. this is the main character of the function ngl πtimestampβ the timestamp to set for the fence event, and it lives in the kernel'sCLOCK_MONOTONICtime domain β° (yes, that domain, iykyk)
π DESCRIPTION π
so what this function does: it sends the event e β which you already initialized with drm_event_reserve_init β over to its associated userspace DRM file. that's it, that's the job β¨
β οΈ before you even think about calling this: callers must already hold drm_device.event_lock. no cap. that's a hard requirement, bestie, not a suggestion π
and here's the part that's genuinely so nice of the kernel: the core takes 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 peeking, no anxiety. iconic behavior, honestly. the core ate that π
π SEE ALSO π
the whole friend group, in order, no one left out π
- Kernel file
./drivers/gpu/drm/drm_file.c file operations(9) drm_file_alloc(9)drm_file_free(9)drm_open(9)drm_release(9)drm_release_noglobal(9)drm_read(9)drm_poll(9)drm_event_reserve_init_locked(9)drm_event_reserve_init(9)drm_event_cancel_free(9)drm_send_event_locked(9)drm_send_event(9)drm_print_memory_stats(9)drm_show_memory_stats(9)drm_show_fdinfo(9)drm_file_err(9)mock_drm_getfile(9)
aaaand that's the page!! π§ source lives at ./drivers/gpu/drm, dated October 2026 β mwah, go forth and send those events, you've got this fr fr π
π
π¦ 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