mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drm/vmwgfx: Split surface metadata from struct vmw_surface
Create a new structure vmw_surface_metadata representing the metadata used for creating surface. With this can make the surface_define_priv a bit cleaner. Signed-off-by: Deepak Rawat <drawat.floss@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Thomas Hellström (VMware) <thomas_os@shipmail.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
committed by
Roland Scheidegger
parent
e8bead9c5c
commit
26b82873a4
@@ -225,24 +225,56 @@ struct vmw_cursor_snooper {
|
||||
struct vmw_framebuffer;
|
||||
struct vmw_surface_offset;
|
||||
|
||||
struct vmw_surface {
|
||||
struct vmw_resource res;
|
||||
SVGA3dSurfaceAllFlags flags;
|
||||
uint32_t format;
|
||||
uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES];
|
||||
/**
|
||||
* struct vmw_surface_metadata - Metadata describing a surface.
|
||||
*
|
||||
* @flags: Device flags.
|
||||
* @format: Surface SVGA3D_x format.
|
||||
* @mip_levels: Mip level for each face. For GB first index is used only.
|
||||
* @multisample_count: Sample count.
|
||||
* @multisample_pattern: Sample patterns.
|
||||
* @quality_level: Quality level.
|
||||
* @autogen_filter: Filter for automatically generated mipmaps.
|
||||
* @array_size: Number of array elements for a 1D/2D texture. For cubemap
|
||||
texture number of faces * array_size. This should be 0 for pre
|
||||
SM4 device.
|
||||
* @num_sizes: Size of @sizes. For GB surface this should always be 1.
|
||||
* @base_size: Surface dimension.
|
||||
* @sizes: Array representing mip sizes. Legacy only.
|
||||
* @scanout: Whether this surface will be used for scanout.
|
||||
*
|
||||
* This tracks metadata for both legacy and guest backed surface.
|
||||
*/
|
||||
struct vmw_surface_metadata {
|
||||
u64 flags;
|
||||
u32 format;
|
||||
u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES];
|
||||
u32 multisample_count;
|
||||
u32 multisample_pattern;
|
||||
u32 quality_level;
|
||||
u32 autogen_filter;
|
||||
u32 array_size;
|
||||
u32 num_sizes;
|
||||
struct drm_vmw_size base_size;
|
||||
struct drm_vmw_size *sizes;
|
||||
uint32_t num_sizes;
|
||||
bool scanout;
|
||||
uint32_t array_size;
|
||||
/* TODO so far just a extra pointer */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vmw_surface: Resource structure for a surface.
|
||||
*
|
||||
* @res: The base resource for this surface.
|
||||
* @metadata: Metadata for this surface resource.
|
||||
* @snooper: Cursor data. Legacy surface only.
|
||||
* @offsets: Legacy surface only.
|
||||
* @view_list: List of views bound to this surface.
|
||||
*/
|
||||
struct vmw_surface {
|
||||
struct vmw_resource res;
|
||||
struct vmw_surface_metadata metadata;
|
||||
struct vmw_cursor_snooper snooper;
|
||||
struct vmw_surface_offset *offsets;
|
||||
SVGA3dTextureFilter autogen_filter;
|
||||
uint32_t multisample_count;
|
||||
struct list_head view_list;
|
||||
SVGA3dMSPattern multisample_pattern;
|
||||
SVGA3dMSQualityLevel quality_level;
|
||||
};
|
||||
|
||||
struct vmw_marker_queue {
|
||||
|
||||
Reference in New Issue
Block a user