Skip to content

Commit

Permalink
drm/vmwgfx: Fix cursor hotspot issue with Wayland on Fedora
Browse files Browse the repository at this point in the history
commit 14979ad upstream.

Parts of commit <8fbf9d92a7bc> (“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: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sinclair Yeh authored and Greg Kroah-Hartman committed Aug 11, 2017
1 parent c1fc78e commit e767207
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,

hotspot_x = du->hotspot_x;
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_dmabuf = vps->dmabuf;

Expand Down Expand Up @@ -411,6 +417,9 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
vmw_cursor_update_position(dev_priv, true,
du->cursor_x + hotspot_x,
du->cursor_y + hotspot_y);

du->core_hotspot_x = hotspot_x - du->hotspot_x;
du->core_hotspot_y = hotspot_y - du->hotspot_y;
} else {
DRM_ERROR("Failed to update cursor image\n");
}
Expand Down

0 comments on commit e767207

Please sign in to comment.