[PATCH 5/8] ACRN:DM:VGPU: Handle the scanout_id for cursor virtio-gpu-cmd


Zhao, Yakui
 

The virtio-gpu in guest_vm also passes the scanout_id for cursor operation.
And this scanout_id should be handled in course of handling cursor cmds.

Signed-off-by: Zhao Yakui <yakui.zhao@...>
---
devicemodel/hw/pci/virtio/virtio_gpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devicemodel/hw/pci/virtio/virtio_gpu.c b/devicemodel/hw/pci/virtio/virtio_gpu.c
index aa955ba23..f33809eee 100644
--- a/devicemodel/hw/pci/virtio/virtio_gpu.c
+++ b/devicemodel/hw/pci/virtio/virtio_gpu.c
@@ -1389,7 +1389,7 @@ virtio_gpu_cmd_update_cursor(struct virtio_gpu_command *cmd)
cur.height = r2d->height;
pixman_image_ref(r2d->image);
cur.data = pixman_image_get_data(r2d->image);
- vdpy_cursor_define(gpu->vdpy_handle, 0, &cur);
+ vdpy_cursor_define(gpu->vdpy_handle, req.pos.scanout_id, &cur);
pixman_image_unref(r2d->image);
}
}
@@ -1402,7 +1402,7 @@ virtio_gpu_cmd_move_cursor(struct virtio_gpu_command *cmd)

gpu = cmd->gpu;
memcpy(&req, cmd->iov[0].iov_base, sizeof(req));
- vdpy_cursor_move(gpu->vdpy_handle, 0, req.pos.x, req.pos.y);
+ vdpy_cursor_move(gpu->vdpy_handle, req.pos.scanout_id, req.pos.x, req.pos.y);
}

static void
--
2.25.1

Join acrn-dev@lists.projectacrn.org to automatically receive all group messages.