diff options
author | Gerd Hoffmann | 2020-10-23 08:46:17 +0200 |
---|---|---|
committer | Gerd Hoffmann | 2020-10-29 06:37:24 +0100 |
commit | 74acdf0af81f803e748523363abd3c145b9d25ad (patch) | |
tree | 28553a73ef646634013d8ef4baa9585bb1a2eaef | |
parent | Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-20201027' in... (diff) | |
download | qemu-74acdf0af81f803e748523363abd3c145b9d25ad.tar.gz qemu-74acdf0af81f803e748523363abd3c145b9d25ad.tar.xz qemu-74acdf0af81f803e748523363abd3c145b9d25ad.zip |
virtio-gpu: add virtio-gpu-pci module
Build virtio-gpu pci devices modular. Must be a separate module because
not all qemu softmmu variants come with PCI support.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20201023064618.21409-2-kraxel@redhat.com
-rw-r--r-- | hw/display/meson.build | 11 | ||||
-rw-r--r-- | util/module.c | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/hw/display/meson.build b/hw/display/meson.build index 0d5ddecd65..6699353713 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -62,8 +62,15 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU') hw_display_modules += {'virtio-gpu': virtio_gpu_ss} endif -softmmu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-gpu-pci.c')) -softmmu_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-gpu-pci.c')) +if config_all_devices.has_key('CONFIG_VIRTIO_PCI') + virtio_gpu_pci_ss = ss.source_set() + virtio_gpu_pci_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], + if_true: [files('virtio-gpu-pci.c'), pixman]) + virtio_gpu_pci_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], + if_true: files('vhost-user-gpu-pci.c')) + hw_display_modules += {'virtio-gpu-pci': virtio_gpu_pci_ss} +endif + softmmu_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c')) softmmu_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c')) diff --git a/util/module.c b/util/module.c index fe3b82dd4d..9490f975d3 100644 --- a/util/module.c +++ b/util/module.c @@ -301,6 +301,9 @@ static struct { { "qxl", "hw-", "display-qxl" }, { "virtio-gpu-device", "hw-", "display-virtio-gpu" }, { "vhost-user-gpu", "hw-", "display-virtio-gpu" }, + { "virtio-gpu-pci-base", "hw-", "display-virtio-gpu-pci" }, + { "virtio-gpu-pci", "hw-", "display-virtio-gpu-pci" }, + { "vhost-user-gpu-pci", "hw-", "display-virtio-gpu-pci" }, { "chardev-braille", "chardev-", "baum" }, { "chardev-spicevmc", "chardev-", "spice" }, { "chardev-spiceport", "chardev-", "spice" }, |