/* SPDX-License-Identifier: GPL-2.0 OR MIT */ /************************************************************************** * * Copyright (c) 2009-2025 Broadcom. All Rights Reserved. The term * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
**************************************************************************/
/** * struct vmw_du_update_plane - Closure structure for vmw_du_helper_plane_update * @plane: Plane which is being updated. * @old_state: Old state of plane. * @dev_priv: Device private. * @du: Display unit on which to update the plane. * @vfb: Framebuffer which is blitted to display unit. * @out_fence: Out fence for resource finish. * @mutex: The mutex used to protect resource reservation. * @cpu_blit: True if need cpu blit. * @intr: Whether to perform waits interruptible if possible. * * This structure loosely represent the set of operations needed to perform a * plane update on a display unit. Implementer will define that functionality * according to the function callbacks for this structure. In brief it involves * surface/buffer object validation, populate FIFO commands and command * submission to the device.
*/ struct vmw_du_update_plane { /** * @calc_fifo_size: Calculate fifo size. * * Determine fifo size for the commands needed for update. The number of * damage clips on display unit @num_hits will be passed to allocate * sufficient fifo space. * * Return: Fifo size needed
*/
uint32_t (*calc_fifo_size)(struct vmw_du_update_plane *update,
uint32_t num_hits);
/** * @post_prepare: Populate fifo for resource preparation. * * Some surface resource or buffer object need some extra cmd submission * like update GB image for proxy surface and define a GMRFB for screen * object. That should be done here as this callback will be * called after FIFO allocation with the address of command buufer. * * This callback is optional. * * Return: Size of commands populated to command buffer.
*/
uint32_t (*post_prepare)(struct vmw_du_update_plane *update, void *cmd);
/** * @pre_clip: Populate fifo before clip. * * This is where pre clip related command should be populated like * surface copy/DMA, etc. * * This callback is optional. * * Return: Size of commands populated to command buffer.
*/
uint32_t (*pre_clip)(struct vmw_du_update_plane *update, void *cmd,
uint32_t num_hits);
/** * @clip: Populate fifo for clip. * * This is where to populate clips for surface copy/dma or blit commands * if needed. This will be called times have damage in display unit, * which is one if doing full update. @clip is the damage in destination * coordinates which is crtc/DU and @src_x, @src_y is damage clip src in * framebuffer coordinate. * * This callback is optional. * * Return: Size of commands populated to command buffer.
*/
uint32_t (*clip)(struct vmw_du_update_plane *update, void *cmd, struct drm_rect *clip, uint32_t src_x, uint32_t src_y);
/** * @post_clip: Populate fifo after clip. * * This is where to populate display unit update commands or blit * commands. * * Return: Size of commands populated to command buffer.
*/
uint32_t (*post_clip)(struct vmw_du_update_plane *update, void *cmd, struct drm_rect *bb);
/** * struct vmw_du_update_plane_surface - closure structure for surface * @base: base closure structure. * @cmd_start: FIFO command start address (used by SOU only).
*/ struct vmw_du_update_plane_surface { struct vmw_du_update_plane base; /* This member is to handle special case SOU surface update */ void *cmd_start;
};
/** * struct vmw_du_update_plane_buffer - Closure structure for buffer object * @base: Base closure structure. * @fb_left: x1 for fb damage bounding box. * @fb_top: y1 for fb damage bounding box.
*/ struct vmw_du_update_plane_buffer { struct vmw_du_update_plane base; int fb_left, fb_top;
};
/** * struct vmw_kms_dirty - closure structure for the vmw_kms_helper_dirty * function. * * @fifo_commit: Callback that is called once for each display unit after * all clip rects. This function must commit the fifo space reserved by the * helper. Set up by the caller. * @clip: Callback that is called for each cliprect on each display unit. * Set up by the caller. * @fifo_reserve_size: Fifo size that the helper should try to allocat for * each display unit. Set up by the caller. * @dev_priv: Pointer to the device private. Set up by the helper. * @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. * @crtc: The crtc for which to build dirty commands. * @num_hits: Number of clip rect commands for this display unit. * Cleared by the helper before the first @clip call. Updated by the @clip * callback. * @fb_x: Clip rect left side in framebuffer coordinates. * @fb_y: Clip rect right side in framebuffer coordinates. * @unit_x1: Clip rect left side in crtc coordinates. * @unit_y1: Clip rect top side in crtc coordinates. * @unit_x2: Clip rect right side in crtc coordinates. * @unit_y2: Clip rect bottom side in crtc coordinates. * * The clip rect coordinates are updated by the helper for each @clip call. * Note that this may be derived from if more info needs to be passed between * helper caller and helper callbacks.
*/ 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;
};
/** * Base class for framebuffers * * @pin is called the when ever a crtc uses this framebuffer * @unpin is called
*/ struct vmw_framebuffer { struct drm_framebuffer base; bool bo;
};
/** * Derived class for crtc state object * * @base DRM crtc object
*/ struct vmw_crtc_state { struct drm_crtc_state base;
};
/** * Derived class for plane state object * * @base DRM plane object * @surf Display surface for STDU * @bo display bo for SOU * @content_fb_type Used by STDU. * @bo_size Size of the bo, used by Screen Object Display Unit * @pinned pin count for STDU display surface
*/ struct vmw_plane_state { struct drm_plane_state base; struct vmw_user_object uo;
int content_fb_type; unsignedlong bo_size;
int pinned;
/* For CPU Blit */ unsignedint cpp;
struct vmw_cursor_plane_state cursor;
};
/** * Derived class for connector state object * * @base DRM connector object * @is_implicit connector property *
*/ struct vmw_connector_state { struct drm_connector_state base;
/** * @gui_x: * * vmwgfx connector property representing the x position of this display * unit (connector is synonymous to display unit) in overall topology. * This is what the device expect as xRoot while creating screen.
*/ int gui_x;
/** * @gui_y: * * vmwgfx connector property representing the y position of this display * unit (connector is synonymous to display unit) in overall topology. * This is what the device expect as yRoot while creating screen.
*/ int gui_y;
};
/** * Base class display unit. * * Since the SVGA hw doesn't have a concept of a crtc, encoder or connector * so the display unit is all of them at the same time. This is true for both * legacy multimon and screen objects.
*/ struct vmw_display_unit { struct drm_crtc crtc; struct drm_encoder encoder; struct drm_connector connector; struct drm_plane primary; struct vmw_cursor_plane cursor;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.