Commit bfc2638d authored by Jakob Bornecrantz's avatar Jakob Bornecrantz Committed by Dave Airlie

vmwgfx: Resend the cursor after legacy modeset

Signed-off-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 203dc220
...@@ -62,9 +62,14 @@ struct vmw_framebuffer { ...@@ -62,9 +62,14 @@ struct vmw_framebuffer {
int vmw_cursor_update_image(struct vmw_private *dev_priv, int vmw_cursor_update_image(struct vmw_private *dev_priv,
u32 *image, u32 width, u32 height, u32 *image, u32 width, u32 height,
u32 hotspotX, u32 hotspotY); u32 hotspotX, u32 hotspotY);
int vmw_cursor_update_dmabuf(struct vmw_private *dev_priv,
struct vmw_dma_buffer *dmabuf,
u32 width, u32 height,
u32 hotspotX, u32 hotspotY);
void vmw_cursor_update_position(struct vmw_private *dev_priv, void vmw_cursor_update_position(struct vmw_private *dev_priv,
bool show, int x, int y); bool show, int x, int y);
/** /**
* Base class display unit. * Base class display unit.
* *
......
...@@ -74,9 +74,10 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) ...@@ -74,9 +74,10 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
{ {
struct vmw_legacy_display *lds = dev_priv->ldu_priv; struct vmw_legacy_display *lds = dev_priv->ldu_priv;
struct vmw_legacy_display_unit *entry; struct vmw_legacy_display_unit *entry;
struct vmw_display_unit *du = NULL;
struct drm_framebuffer *fb = NULL; struct drm_framebuffer *fb = NULL;
struct drm_crtc *crtc = NULL; struct drm_crtc *crtc = NULL;
int i = 0; int i = 0, ret;
/* If there is no display topology the host just assumes /* If there is no display topology the host just assumes
* that the guest will set the same layout as the host. * that the guest will set the same layout as the host.
...@@ -129,6 +130,25 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) ...@@ -129,6 +130,25 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
lds->last_num_active = lds->num_active; lds->last_num_active = lds->num_active;
/* Find the first du with a cursor. */
list_for_each_entry(entry, &lds->active, active) {
du = &entry->base;
if (!du->cursor_dmabuf)
continue;
ret = vmw_cursor_update_dmabuf(dev_priv,
du->cursor_dmabuf,
64, 64,
du->hotspot_x,
du->hotspot_y);
if (ret == 0)
break;
DRM_ERROR("Could not update cursor image\n");
}
return 0; return 0;
} }
......
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