Commit e7672072 authored by Sinclair Yeh's avatar Sinclair Yeh Committed by Greg Kroah-Hartman

drm/vmwgfx: Fix cursor hotspot issue with Wayland on Fedora

commit 14979adb upstream.

Parts of commit <8fbf9d92> (“drm/vmwgfx: Implement the
cursor_set2 callback v2”) were not moved over when we started
atomic mode set development because at that time the DRM did
not support cursor hotspots in the fb struct.

This patch fixes what was not moved over.
Signed-off-by: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
Tested-by: default avatarBrian Paul <brianp@vmware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1fc78ea
...@@ -384,6 +384,12 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane, ...@@ -384,6 +384,12 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
hotspot_x = du->hotspot_x; hotspot_x = du->hotspot_x;
hotspot_y = du->hotspot_y; hotspot_y = du->hotspot_y;
if (plane->fb) {
hotspot_x += plane->fb->hot_x;
hotspot_y += plane->fb->hot_y;
}
du->cursor_surface = vps->surf; du->cursor_surface = vps->surf;
du->cursor_dmabuf = vps->dmabuf; du->cursor_dmabuf = vps->dmabuf;
...@@ -411,6 +417,9 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane, ...@@ -411,6 +417,9 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
vmw_cursor_update_position(dev_priv, true, vmw_cursor_update_position(dev_priv, true,
du->cursor_x + hotspot_x, du->cursor_x + hotspot_x,
du->cursor_y + hotspot_y); du->cursor_y + hotspot_y);
du->core_hotspot_x = hotspot_x - du->hotspot_x;
du->core_hotspot_y = hotspot_y - du->hotspot_y;
} else { } else {
DRM_ERROR("Failed to update cursor image\n"); DRM_ERROR("Failed to update cursor image\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment