drivers/gpu/drm/vmwgfx/vmwgfx_kms.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
Extension
.h
Size
16185 bytes
Lines
516
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

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 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;
};

/**
 * 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

Annotation

Implementation Notes