diff options
author | Tina Zhang <tina.zhang@intel.com> | 2018-04-27 17:11:06 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-04-27 11:36:34 +0200 |
commit | 8983e3e35033ecb9234725c2bba65f020824969b (patch) | |
tree | bc49d46c83d8b5cd67a14f86fc1a31bc5a931fe4 /hw/vfio/pci.h | |
parent | 7cd0afe69f3330a104b1462c01156dd8525b9bdd (diff) | |
download | qemu-8983e3e35033ecb9234725c2bba65f020824969b.zip qemu-8983e3e35033ecb9234725c2bba65f020824969b.tar.gz qemu-8983e3e35033ecb9234725c2bba65f020824969b.tar.bz2 |
ui: introduce vfio_display_reset
During guest OS reboot, guest framebuffer is invalid. It will cause
bugs, if the invalid guest framebuffer is still used by host.
This patch is to introduce vfio_display_reset which is invoked
during vfio display reset. This vfio_display_reset function is used
to release the invalid display resource, disable scanout mode and
replace the invalid surface with QemuConsole's DisplaySurafce.
This patch can fix the GPU hang issue caused by gd_egl_draw during
guest OS reboot.
Changes v3->v4:
- Move dma-buf based display check into the vfio_display_reset().
(Gerd)
Changes v2->v3:
- Limit vfio_display_reset to dma-buf based vfio display. (Gerd)
Changes v1->v2:
- Use dpy_gfx_update_full() update screen after reset. (Gerd)
- Remove dpy_gfx_switch_surface(). (Gerd)
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Message-id: 1524820266-27079-3-git-send-email-tina.zhang@intel.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/vfio/pci.h')
-rw-r--r-- | hw/vfio/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index 629c875..59ab775 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -176,6 +176,7 @@ int vfio_pci_igd_opregion_init(VFIOPCIDevice *vdev, struct vfio_region_info *info, Error **errp); +void vfio_display_reset(VFIOPCIDevice *vdev); int vfio_display_probe(VFIOPCIDevice *vdev, Error **errp); void vfio_display_finalize(VFIOPCIDevice *vdev); |