mirror of https://gitee.com/openkylin/qemu.git
virtio-vga: fix reset
We must call the reset functions for both virtio-gpu and vga to properly reset the combo device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20180821111313.27792-2-kraxel@redhat.com
This commit is contained in:
parent
19b599f766
commit
43e4dbe206
|
@ -1289,7 +1289,7 @@ static void virtio_gpu_instance_init(Object *obj)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void virtio_gpu_reset(VirtIODevice *vdev)
|
void virtio_gpu_reset(VirtIODevice *vdev)
|
||||||
{
|
{
|
||||||
VirtIOGPU *g = VIRTIO_GPU(vdev);
|
VirtIOGPU *g = VIRTIO_GPU(vdev);
|
||||||
struct virtio_gpu_simple_resource *res, *tmp;
|
struct virtio_gpu_simple_resource *res, *tmp;
|
||||||
|
|
|
@ -179,8 +179,12 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
||||||
static void virtio_vga_reset(DeviceState *dev)
|
static void virtio_vga_reset(DeviceState *dev)
|
||||||
{
|
{
|
||||||
VirtIOVGA *vvga = VIRTIO_VGA(dev);
|
VirtIOVGA *vvga = VIRTIO_VGA(dev);
|
||||||
vvga->vdev.enable = 0;
|
|
||||||
|
|
||||||
|
/* reset virtio-gpu */
|
||||||
|
virtio_gpu_reset(VIRTIO_DEVICE(&vvga->vdev));
|
||||||
|
|
||||||
|
/* reset vga */
|
||||||
|
vga_common_reset(&vvga->vga);
|
||||||
vga_dirty_log_start(&vvga->vga);
|
vga_dirty_log_start(&vvga->vga);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,7 @@ extern const GraphicHwOps virtio_gpu_ops;
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* virtio-gpu.c */
|
/* virtio-gpu.c */
|
||||||
|
void virtio_gpu_reset(VirtIODevice *vdev);
|
||||||
void virtio_gpu_ctrl_response(VirtIOGPU *g,
|
void virtio_gpu_ctrl_response(VirtIOGPU *g,
|
||||||
struct virtio_gpu_ctrl_command *cmd,
|
struct virtio_gpu_ctrl_command *cmd,
|
||||||
struct virtio_gpu_ctrl_hdr *resp,
|
struct virtio_gpu_ctrl_hdr *resp,
|
||||||
|
|
Loading…
Reference in New Issue