Skip to content

Commit 9613890

Browse files
committed
drm/vmwgfx: Use the hotspot properties from cursor planes
jira VULN-136708 cve-bf CVE-2025-38449 commit-author Zack Rusin <zackr@vmware.com> commit cd54994 Atomic modesetting got support for mouse hotspots via the hotspot properties. Port the legacy kms hotspot handling to the new properties on cursor planes. Signed-off-by: Zack Rusin <zackr@vmware.com> Cc: Maaz Mombasawala <mombasawalam@vmware.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-4-aesteve@redhat.com (cherry picked from commit cd54994) Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
1 parent 4a622d7 commit 9613890

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -768,13 +768,8 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
768768
struct vmw_plane_state *old_vps = vmw_plane_state_to_vps(old_state);
769769
s32 hotspot_x, hotspot_y;
770770

771-
hotspot_x = du->hotspot_x;
772-
hotspot_y = du->hotspot_y;
773-
774-
if (new_state->fb) {
775-
hotspot_x += new_state->fb->hot_x;
776-
hotspot_y += new_state->fb->hot_y;
777-
}
771+
hotspot_x = du->hotspot_x + new_state->hotspot_x;
772+
hotspot_y = du->hotspot_y + new_state->hotspot_y;
778773

779774
du->cursor_surface = vps->surf;
780775
du->cursor_bo = vps->bo;

0 commit comments

Comments
 (0)