STRUCT VMW_DU_UPDATE_PLANE(9)
๐ 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:
struct vmw_du_update_plane_surface(9)struct vmw_du_update_plane_buffer(9)struct vmw_kms_dirty(9)vmw_du_translate_to_crtc(9)
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
- 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