drm/vmwgfx: Fix cursor plane on HW version 10
Subsystems (3)
PATCH 1/1 drm/vmwgfx: Fix cursor plane on HW version 10
This covers the case where a Dumb Buffer is attached to the cursor plane on HW version 10 and below.
Also suppresses the unknown cursor type warning if there is no FB attached to the plane.
Fixes 965544150d1c ("drm/vmwgfx: Refactor cursor handling")
Signed-off-by Ian Forbes <[email protected]>
--- drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c | 9 ++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c +8 -1
@@ -103,7 +103,11 @@ vmw_cursor_update_type(struct vmw_private *vmw, struct vmw_plane_state *vps)else return VMW_CURSOR_UPDATE_GB_ONLY ; } -drm_warn_once (&vmw->drm,"Unknown Cursor Type!\n" ); + +if (vmw_user_object_buffer (&vps->uo)) +return VMW_CURSOR_UPDATE_DUMB ; +if (vps->base.fb) +drm_warn_once (&vmw->drm,"Unknown Cursor Type!\n" );return VMW_CURSOR_UPDATE_NONE ; }
@@ -142,6 +146,7 @@ static u32 vmw_cursor_mob_size(enum vmw_cursor_update_type update_type,switch (update_type) {case VMW_CURSOR_UPDATE_LEGACY :case VMW_CURSOR_UPDATE_GB_ONLY : +case VMW_CURSOR_UPDATE_DUMB :case VMW_CURSOR_UPDATE_NONE :return 0 ;case VMW_CURSOR_UPDATE_MOB :
@@ -627,6 +632,7 @@ int vmw_cursor_plane_prepare_fb(struct drm_plane *plane, vps->cursor.update_type =VMW_CURSOR_UPDATE_NONE ;break ;case VMW_CURSOR_UPDATE_GB_ONLY : +case VMW_CURSOR_UPDATE_DUMB :case VMW_CURSOR_UPDATE_MOB : { bo =vmw_user_object_buffer (&vps->uo);if (bo) {
@@ -768,6 +774,7 @@ vmw_cursor_plane_atomic_update(struct drm_plane *plane,vmw_cursor_update_mob (dev_priv, vps);break ;case VMW_CURSOR_UPDATE_GB_ONLY : +case VMW_CURSOR_UPDATE_DUMB : bo =vmw_user_object_buffer (&vps->uo);if (bo) vmw_send_define_cursor_cmd(dev_priv, bo->map.virtual,
drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.h +1 -0
@@ -35,6 +35,7 @@ enum vmw_cursor_update_type {VMW_CURSOR_UPDATE_LEGACY ,VMW_CURSOR_UPDATE_GB_ONLY ,VMW_CURSOR_UPDATE_MOB , + VMW_CURSOR_UPDATE_DUMB, }; struct vmw_cursor_plane_state {
Signature · 1 line
2.51.1