From 50d8e25ea66db01f4214234803506dc1b28cb8d2 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 24 May 2019 15:09:44 +0200 Subject: virtio-gpu: split virtio-gpu, introduce virtio-gpu-base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a base class that is common to virtio-gpu and vhost-user-gpu devices. The VirtIOGPUBase base class provides common functionalities necessary for both virtio-gpu and vhost-user-gpu: - common configuration (max-outputs, initial resolution, flags) - virtio device initialization, including queue setup - device pre-conditions checks (iommu) - migration blocker - virtio device callbacks - hooking up to qemu display subsystem - a few common helper functions to reset the device, retrieve display informations - a class callback to unblock the rendering (for GL updates) What is left to the virtio-gpu subdevice to take care of, in short, are all the virtio queues handling, command processing and migration. Signed-off-by: Marc-André Lureau Message-id: 20190524130946.31736-8-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/virtio-gpu-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/display/virtio-gpu-pci.c') diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c index 0bc4d9d424..87f61e857c 100644 --- a/hw/display/virtio-gpu-pci.c +++ b/hw/display/virtio-gpu-pci.c @@ -41,7 +41,7 @@ static Property virtio_gpu_pci_properties[] = { static void virtio_gpu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) { VirtIOGPUPCI *vgpu = VIRTIO_GPU_PCI(vpci_dev); - VirtIOGPU *g = &vgpu->vdev; + VirtIOGPUBase *g = VIRTIO_GPU_BASE(&vgpu->vdev); DeviceState *vdev = DEVICE(&vgpu->vdev); int i; Error *local_error = NULL; -- cgit 1.4.1