STRUCT DRM_PENDING_EVENT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

ok okay so this page is struct drm_pending_event(9) from the Kernel API Manual, and it's literally just about struct drm_pending_event β€” an event that's queued up so userspace can come read it πŸŽ€


✨ SYNOPSIS ✨

here's the whole struct bestie, no notes, look at her:

struct drm_pending_event {
    struct completion *completion;
    void (*completion_release)(struct completion *completion);
    struct drm_event *event;
    struct dma_fence *fence;
    struct drm_file *file_priv;
    struct list_head link;
    struct list_head pending_link;
 };

🫢 Members 🫢

okay so let's go member by member, i got you:

  • completion β€” optional pointer to a kernel internal completion that gets signalled when drm_send_event is called. lowkey iconic for internally synchronizing with nonblocking operations πŸ’«
  • completion_release β€” optional callback, and rn it's only used by the atomic modeset helpers to clean up the reference count for the structure that completion is stored in. niche but essential fr fr
  • event β€” pointer to the actual event that should get sent to userspace, to be read using drm_read. can be optional tho, because nowadays events are also used to signal kernel internal threads with completion or DMA transactions using fence πŸ‘‘
  • fence β€” optional DMA fence that unblocks other hardware transactions which depend on the nonblocking DRM operation this event represents. it's giving traffic controller 🌈
  • file_priv β€” the struct drm_file where the event should be delivered to. only set when event is set, periodt πŸŽ€
  • link β€” a double-linked list to keep track of this event. the driver can use it up to the point where it calls drm_send_event β€” after that, this list entry is owned by the core for its own book-keeping, so hands off bestie πŸ™ˆ
  • pending_link β€” the entry on drm_file.pending_event_list, tracking all the pending events for file_priv, so everything can be unwound correctly when userspace closes the file before the event is delivered. very "i'll remember this" of it πŸ’€

🌸 Description 🌸

so this whole thing represents a DRM event, right? drivers can use it as a generic completion mechanism, and it's got range β€” it supports kernel-internal struct completion, struct dma_fence, and the DRM-specific struct drm_event delivery mechanism. versatile queen ✨


πŸ¦‹ SEE ALSO πŸ¦‹

go read up on these, all in the kernel file ./include/drm/drm_file.h:


and that's the whole page, bestie, you ate that πŸ’… this one lives in ./include/drm and the version vibes are dated October 2026 β€” mwah, go read some kernel source, ily πŸ«ΆπŸ’–

πŸ“¦ where this page comes from