Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vmwgfx: Restore Guest-Backed only cursor plane support

The referenced fixes commit broke the cursor plane for configurations
which have Guest-Backed surfaces but no cursor MOB support.

Fixes: 965544150d1c ("drm/vmwgfx: Refactor cursor handling")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20251103201920.381503-1-ian.forbes@broadcom.com

authored by

Ian Forbes and committed by
Zack Rusin
eef295a8 c1962742

+16 -1
+15 -1
drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c
··· 100 100 if (vmw->has_mob) { 101 101 if ((vmw->capabilities2 & SVGA_CAP2_CURSOR_MOB) != 0) 102 102 return VMW_CURSOR_UPDATE_MOB; 103 + else 104 + return VMW_CURSOR_UPDATE_GB_ONLY; 103 105 } 104 - 106 + drm_warn_once(&vmw->drm, "Unknown Cursor Type!\n"); 105 107 return VMW_CURSOR_UPDATE_NONE; 106 108 } 107 109 ··· 141 139 { 142 140 switch (update_type) { 143 141 case VMW_CURSOR_UPDATE_LEGACY: 142 + case VMW_CURSOR_UPDATE_GB_ONLY: 144 143 case VMW_CURSOR_UPDATE_NONE: 145 144 return 0; 146 145 case VMW_CURSOR_UPDATE_MOB: ··· 626 623 if (!surface || vps->cursor.legacy.id == surface->snooper.id) 627 624 vps->cursor.update_type = VMW_CURSOR_UPDATE_NONE; 628 625 break; 626 + case VMW_CURSOR_UPDATE_GB_ONLY: 629 627 case VMW_CURSOR_UPDATE_MOB: { 630 628 bo = vmw_user_object_buffer(&vps->uo); 631 629 if (bo) { ··· 741 737 vmw_cursor_plane_atomic_update(struct drm_plane *plane, 742 738 struct drm_atomic_state *state) 743 739 { 740 + struct vmw_bo *bo; 744 741 struct drm_plane_state *new_state = 745 742 drm_atomic_get_new_plane_state(state, plane); 746 743 struct drm_plane_state *old_state = ··· 766 761 break; 767 762 case VMW_CURSOR_UPDATE_MOB: 768 763 vmw_cursor_update_mob(dev_priv, vps); 764 + break; 765 + case VMW_CURSOR_UPDATE_GB_ONLY: 766 + bo = vmw_user_object_buffer(&vps->uo); 767 + if (bo) 768 + vmw_send_define_cursor_cmd(dev_priv, bo->map.virtual, 769 + vps->base.crtc_w, 770 + vps->base.crtc_h, 771 + vps->base.hotspot_x, 772 + vps->base.hotspot_y); 769 773 break; 770 774 case VMW_CURSOR_UPDATE_NONE: 771 775 /* do nothing */
+1
drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.h
··· 33 33 enum vmw_cursor_update_type { 34 34 VMW_CURSOR_UPDATE_NONE = 0, 35 35 VMW_CURSOR_UPDATE_LEGACY, 36 + VMW_CURSOR_UPDATE_GB_ONLY, 36 37 VMW_CURSOR_UPDATE_MOB, 37 38 }; 38 39