STRUCT VMW_DU_UPDATE_PLANE(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… struct vmw_du_update_plane(9)

hiii bestie, welcome to the Kernel API Manual โœจ this one's about struct vmw_du_update_plane, and ngl it's giving "backstage pass to a plane update". let's get into it ๐Ÿซถ


โœจ NAME โœจ

struct vmw_du_update_plane โ€” the closure structure for vmw_du_helper_plane_update ๐Ÿ’ซ like, the little bundle of function pointers and state that makes the helper do its thing.


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

struct vmw_du_update_plane {
    uint32_t (*calc_fifo_size)(struct vmw_du_update_plane *update,
uint32_t num_hits);
    uint32_t (*post_prepare)(struct vmw_du_update_plane *update, void
*cmd);
    uint32_t (*pre_clip)(struct vmw_du_update_plane *update, void *cmd,
uint32_t num_hits);
    uint32_t (*clip)(struct vmw_du_update_plane *update, void *cmd,
struct drm_rect *clip, uint32_t src_x, uint32_t src_y);
    uint32_t (*post_clip)(struct vmw_du_update_plane *update, void *cmd,
struct drm_rect *bb);
    struct drm_plane *plane;
    struct drm_plane_state *old_state;
    struct vmw_private *dev_priv;
    struct vmw_display_unit *du;
    struct vmw_framebuffer *vfb;
    struct vmw_fence_obj **out_fence;
    struct mutex *mutex;
    bool intr;
 };

๐Ÿ’œ MEMBERS ๐Ÿ’œ

okay so here's the whole cast, one iconic member at a time ๐Ÿ‘‘

calc_fifo_size

Calculate fifo size. ๐Ÿงฎ

Figure out the fifo size you need for the commands that the update requires. The number of damage clips on the display unit โ€” that's num_hits โ€” gets passed in so you can allocate enough fifo space.

Return: the fifo size you need โญ

post_prepare

Populate fifo for resource preparation. ๐Ÿ› ๏ธ

Some surface resources or buffer objects need a little extra cmd submission, like updating the GB image for a proxy surface, or defining a GMRFB for a screen object. That's the vibe here โ€” this callback fires after the FIFO allocation, and it gets handed the address of the command buffer.

This callback is optional. no pressure ๐Ÿ’…

Return: the size of the commands populated into the command buffer.

pre_clip

Populate fifo before clip. ๐ŸŒธ

This is where your pre-clip-related commands go โ€” surface copy/DMA and friends, etc.

This callback is optional.

Return: the size of the commands populated into the command buffer.

clip

Populate fifo for clip. โœ‚๏ธ

This is the spot where you populate clips for surface copy/dma or blit commands, if you need them. It gets called however many times there's damage in the display unit โ€” which is one time if you're doing a full update. clip is the damage in destination coordinates (that's crtc/DU), and src_x, src_y are the damage clip's source in framebuffer coordinates.

This callback is optional.

Return: the size of the commands populated into the command buffer.

post_clip

Populate fifo after clip. ๐Ÿฆ‹

This is where you populate the display unit update commands, or the blit commands.

Return: the size of the commands populated into the command buffer.

plane

The plane that's being updated. โœˆ๏ธ main character energy fr.

old_state

The old state of the plane. ๐Ÿ•ฐ๏ธ

dev_priv

Device private. ๐Ÿ”’

du

The display unit on which the plane gets updated. ๐Ÿ–ฅ๏ธ

vfb

The framebuffer that's blitted to the display unit. ๐Ÿ–ผ๏ธ

out_fence

Out fence for resource finish. ๐Ÿ

mutex

The mutex used to protect resource reservation. ๐Ÿ”

intr

Whether to perform waits interruptible if possible. ๐Ÿ˜ด (yes, if possible!)


๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

okay so this structure loosely represents the set of operations you need to perform a plane update on a display unit. whoever's implementing it defines that functionality according to this structure's function callbacks. in brief โ€” and I do mean in brief โ€” it involves surface/buffer object validation, populating FIFO commands, and submitting commands to the device. that's the whole arc, start to finish ๐Ÿ’ซ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

Kernel file ./drivers/gpu/drm/vmwgfx/vmwgfx_kms.h โ€” plus these cuties, go read them too:


ngl the fifo is the whole plot here. allocate it right, bestie, or the commands simply will not fit ๐Ÿ’€

and that's the page!! ๐ŸŽ€ brought to you by ./drivers/gpu/drm/vmwgfx, dated October 2026, and yeah โ€” the header said struct vmw_du_update_plane(9) and the footer said the same, so we've come full circle ๐Ÿซถ slay, go update some planes โœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from