ACRN:DM:VGPU: Handle the scanout_id for cursor virtio-gpu-cmd

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

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
This commit is contained in:
Zhao Yakui 2022-08-15 10:43:00 +08:00 committed by acrnsi-robot
parent 43626d1803
commit 6d83cd17f8
1 changed files with 2 additions and 2 deletions

View File

@ -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