Commit 53bc3f6f authored by Michael Banack's avatar Michael Banack Committed by Zack Rusin

drm/vmwgfx: Clean up cursor mobs

Clean up the cursor mob path by moving ownership of the mobs into the
plane_state, and just leaving a cache of unused mobs in the plane
itself.
Signed-off-by: default avatarMichael Banack <banackm@vmware.com>
Signed-off-by: default avatarZack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-7-zack@kde.org
parent 9e931f2e
This diff is collapsed.
...@@ -295,13 +295,11 @@ struct vmw_plane_state { ...@@ -295,13 +295,11 @@ struct vmw_plane_state {
/* For CPU Blit */ /* For CPU Blit */
unsigned int cpp; unsigned int cpp;
/* CursorMob flipping index; -1 if cursor mobs not used */ struct {
unsigned int cursor_mob_idx; struct ttm_buffer_object *bo;
/* Currently-active CursorMob */ struct ttm_bo_kmap_obj map;
struct ttm_buffer_object *cm_bo; bool mapped;
/* CursorMob kmap_obj; expected valid at cursor_plane_atomic_update } cursor;
IFF currently-active CursorMob above is valid */
struct ttm_bo_kmap_obj cm_map;
}; };
...@@ -338,11 +336,12 @@ struct vmw_connector_state { ...@@ -338,11 +336,12 @@ struct vmw_connector_state {
* Derived class for cursor plane object * Derived class for cursor plane object
* *
* @base DRM plane object * @base DRM plane object
* @cursor_mob array of two MOBs for CursorMob flipping * @cursor.cursor_mobs Cursor mobs available for re-use
*/ */
struct vmw_cursor_plane { struct vmw_cursor_plane {
struct drm_plane base; struct drm_plane base;
struct ttm_buffer_object *cursor_mob[2];
struct ttm_buffer_object *cursor_mobs[3];
}; };
/** /**
...@@ -472,8 +471,6 @@ void vmw_kms_create_implicit_placement_property(struct vmw_private *dev_priv); ...@@ -472,8 +471,6 @@ void vmw_kms_create_implicit_placement_property(struct vmw_private *dev_priv);
/* Universal Plane Helpers */ /* Universal Plane Helpers */
void vmw_du_primary_plane_destroy(struct drm_plane *plane); void vmw_du_primary_plane_destroy(struct drm_plane *plane);
void vmw_du_cursor_plane_destroy(struct drm_plane *plane); void vmw_du_cursor_plane_destroy(struct drm_plane *plane);
int vmw_du_create_cursor_mob_array(struct vmw_cursor_plane *vcp);
void vmw_du_destroy_cursor_mob_array(struct vmw_cursor_plane *vcp);
/* Atomic Helpers */ /* Atomic Helpers */
int vmw_du_primary_plane_atomic_check(struct drm_plane *plane, int vmw_du_primary_plane_atomic_check(struct drm_plane *plane,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment