From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH v2 6/6] virtio-gpu: build modular
Date: Mon, 14 Sep 2020 15:42:24 +0200 [thread overview]
Message-ID: <20200914134224.29769-7-kraxel@redhat.com> (raw)
In-Reply-To: <20200914134224.29769-1-kraxel@redhat.com>
Only build virtio-gpu-device modular (the code which actually depends on
the external virglrenderer library). virtio-gpu-pci and virtio-vga are
compiled into core qemu still.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
util/module.c | 2 ++
hw/display/meson.build | 22 ++++++----------------
2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/util/module.c b/util/module.c
index 6e63006a8fb2..34772e7d87eb 100644
--- a/util/module.c
+++ b/util/module.c
@@ -265,6 +265,8 @@ static struct {
{ "usb-redir", "hw-", "usb-redirect" },
{ "qxl-vga", "hw-", "display-qxl" },
{ "qxl", "hw-", "display-qxl" },
+ { "virtio-gpu-device", "hw-", "display-virtio-gpu" },
+ { "vhost-user-gpu", "hw-", "display-virtio-gpu" },
{ "chardev-braille", "chardev-", "baum" },
};
diff --git a/hw/display/meson.build b/hw/display/meson.build
index 2f07d427ddc8..0d5ddecd6503 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -59,24 +59,14 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), pixman, virgl])
virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
- virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-gpu-pci.c'))
- virtio_gpu_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-gpu-pci.c'))
- virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c'))
- virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c'))
-
- # FIXME: this was attempted in the Makefile build system; it was then reverted
- # as it would try to load all devices when the module is loaded, even if
- # config_devices for this target only has some of them. Since virtio-gpu-pci
- # and virtio-vga both instantiate a virtio-gpu-device, fixing it probably does
- # not even require a dependency system, just splitting the module in three
- # for CONFIG_VIRTIO_GPU/CONFIG_VHOST_USER_GPU, CONFIG_VIRTIO_PCI and
- # CONFIG_VIRTIO_VGA/CONFIG_VHOST_USER_VGA.
- # Sourcesets are a dime a dozen, so keep it and just disable module builds.
-
- #hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
- softmmu_ss.add_all(virtio_gpu_ss)
+ 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'))
+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'))
+
specific_ss.add(when: [x11, opengl, 'CONFIG_MILKYMIST_TMU2'], if_true: files('milkymist-tmu2.c'))
specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
--
2.27.0
prev parent reply other threads:[~2020-09-14 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 13:42 [PATCH v2 0/6] meson: fix device module builds Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 1/6] meson: fix qxl dependencies Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 2/6] meson: fix module config Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 3/6] meson: remove duplicate qxl sources Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 4/6] object_initialize: try module load Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 5/6] virtio-gpu: make virtio_gpu_ops static Gerd Hoffmann
2020-09-14 13:42 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200914134224.29769-7-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).