Skip to content

Commit 4b88a29

Browse files
committed
drm/virtio: Use the hotspot properties from cursor planes
jira VULN-136708 cve-bf CVE-2025-38449 commit-author Zack Rusin <zackr@vmware.com> commit cc6c535 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> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Cc: David Airlie <airlied@linux.ie> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Cc: Chia-I Wu <olvaffe@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: virtualization@lists.linux-foundation.org Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-7-aesteve@redhat.com (cherry picked from commit cc6c535) Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
1 parent 4b24df7 commit 4b88a29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/virtio/virtgpu_plane.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,16 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
333333
DRM_DEBUG("update, handle %d, pos +%d+%d, hot %d,%d\n", handle,
334334
plane->state->crtc_x,
335335
plane->state->crtc_y,
336-
plane->state->fb ? plane->state->fb->hot_x : 0,
337-
plane->state->fb ? plane->state->fb->hot_y : 0);
336+
plane->state->hotspot_x,
337+
plane->state->hotspot_y);
338338
output->cursor.hdr.type =
339339
cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR);
340340
output->cursor.resource_id = cpu_to_le32(handle);
341341
if (plane->state->fb) {
342342
output->cursor.hot_x =
343-
cpu_to_le32(plane->state->fb->hot_x);
343+
cpu_to_le32(plane->state->hotspot_x);
344344
output->cursor.hot_y =
345-
cpu_to_le32(plane->state->fb->hot_y);
345+
cpu_to_le32(plane->state->hotspot_y);
346346
} else {
347347
output->cursor.hot_x = cpu_to_le32(0);
348348
output->cursor.hot_y = cpu_to_le32(0);

0 commit comments

Comments
 (0)