STRUCT VMW_KMS_DIRTY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct vmw_kms_dirty(9) β€” like, the whole vibe

okay so bestie, welcome to the kernel API manual, section 9 β€” we're talking about struct vmw_kms_dirty, and honestly? it's giving closure structure goals. ✨

It's the closure struct that the vmw_kms_helper_dirty function passes around. Think of it as the lil group chat that everybody in the helper/callback friend group keeps replying in. 🫢


✨ SYNOPSIS ✨

like, the whole shape of it, no cap:

struct vmw_kms_dirty {
    void (*fifo_commit)(struct vmw_kms_dirty *);
    void (*clip)(struct vmw_kms_dirty *);
    size_t fifo_reserve_size;
    struct vmw_private *dev_priv;
    struct vmw_display_unit *unit;
    void *cmd;
    struct drm_crtc *crtc;
    u32 num_hits;
    s32 fb_x;
    s32 fb_y;
    s32 unit_x1;
    s32 unit_y1;
    s32 unit_x2;
    s32 unit_y2;
 };

πŸŽ€ Members πŸŽ€

okay so here's who's who in the struct, and who sets them up, because that part matters SO much:

  • fifo_commit β€” a callback that gets called once per display unit, right after all the clip rects are done. This function's whole job is to commit the fifo space that the helper reserved. Set up by the caller. πŸ‘‘
  • clip β€” a callback called for each cliprect on each display unit. Set up by the caller. literally her moment.
  • fifo_reserve_size β€” the fifo size that the helper should try to allocate for each display unit. Set up by the caller. πŸ’–
  • dev_priv β€” pointer to the device private. Set up by the helper. slay.
  • unit β€” the current display unit. Set up by the helper before a call to clip. πŸ¦‹
  • cmd β€” the allocated fifo space. Set up by the helper before the first clip call. main character energy fr.
  • crtc β€” the crtc for which we're building the dirty commands. 🌸
  • num_hits β€” number of clip rect commands for this display unit. Cleared by the helper before the first clip call, then updated by the clip callback. teamwork!
  • fb_x β€” the clip rect's left side, in framebuffer coordinates.
  • fb_y β€” the clip rect's right side, in framebuffer coordinates. (yep, "right" β€” that's literally what it says πŸ‘€)
  • unit_x1 β€” the clip rect's left side, in crtc coordinates.
  • unit_y1 β€” the clip rect's top side, in crtc coordinates. ⭐
  • unit_x2 β€” the clip rect's right side, in crtc coordinates.
  • unit_y2 β€” the clip rect's bottom side, in crtc coordinates. πŸ’€

🌈 Description 🌈

so the helper updates the clip rect coordinates on every single clip call β€” that's the whole loop, bestie. πŸ”₯

also, heads up: this may be derived from if more info needs to be passed between the helper caller and the helper callbacks. iykyk β€” plan accordingly. πŸ’…


πŸ’œ SEE ALSO πŸ’œ

go check out the kernel file ./drivers/gpu/drm/vmwgfx/vmwgfx_kms.h struct vmw_du_update_plane(9), struct vmw_du_update_plane_surface(9), struct vmw_du_update_plane_buffer(9), and vmw_du_translate_to_crtc(9) β€” the whole friend group, fr fr. 🧚


okay and that's the page!! πŸ“ this one lives out of ./drivers/gpu/drm/vmwgfx, dated October 2026 β€” bye bestie, go commit that fifo space πŸ’–βœ¨
πŸ“¦ where this page comes from