@@ -100,8 +100,10 @@ vmw_cursor_update_type(struct vmw_private *vmw, struct vmw_plane_state *vps)
100100 if (vmw -> has_mob ) {
101101 if ((vmw -> capabilities2 & SVGA_CAP2_CURSOR_MOB ) != 0 )
102102 return VMW_CURSOR_UPDATE_MOB ;
103+ else
104+ return VMW_CURSOR_UPDATE_GB_ONLY ;
103105 }
104-
106+ drm_warn_once ( & vmw -> drm , "Unknown Cursor Type!\n" );
105107 return VMW_CURSOR_UPDATE_NONE ;
106108}
107109
@@ -139,6 +141,7 @@ static u32 vmw_cursor_mob_size(enum vmw_cursor_update_type update_type,
139141{
140142 switch (update_type ) {
141143 case VMW_CURSOR_UPDATE_LEGACY :
144+ case VMW_CURSOR_UPDATE_GB_ONLY :
142145 case VMW_CURSOR_UPDATE_NONE :
143146 return 0 ;
144147 case VMW_CURSOR_UPDATE_MOB :
@@ -623,6 +626,7 @@ int vmw_cursor_plane_prepare_fb(struct drm_plane *plane,
623626 if (!surface || vps -> cursor .legacy .id == surface -> snooper .id )
624627 vps -> cursor .update_type = VMW_CURSOR_UPDATE_NONE ;
625628 break ;
629+ case VMW_CURSOR_UPDATE_GB_ONLY :
626630 case VMW_CURSOR_UPDATE_MOB : {
627631 bo = vmw_user_object_buffer (& vps -> uo );
628632 if (bo ) {
737741vmw_cursor_plane_atomic_update (struct drm_plane * plane ,
738742 struct drm_atomic_state * state )
739743{
744+ struct vmw_bo * bo ;
740745 struct drm_plane_state * new_state =
741746 drm_atomic_get_new_plane_state (state , plane );
742747 struct drm_plane_state * old_state =
@@ -762,6 +767,15 @@ vmw_cursor_plane_atomic_update(struct drm_plane *plane,
762767 case VMW_CURSOR_UPDATE_MOB :
763768 vmw_cursor_update_mob (dev_priv , vps );
764769 break ;
770+ case VMW_CURSOR_UPDATE_GB_ONLY :
771+ bo = vmw_user_object_buffer (& vps -> uo );
772+ if (bo )
773+ vmw_send_define_cursor_cmd (dev_priv , bo -> map .virtual ,
774+ vps -> base .crtc_w ,
775+ vps -> base .crtc_h ,
776+ vps -> base .hotspot_x ,
777+ vps -> base .hotspot_y );
778+ break ;
765779 case VMW_CURSOR_UPDATE_NONE :
766780 /* do nothing */
767781 break ;
0 commit comments