Message ID | 20201023064618.21409-3-kraxel@redhat.com |
---|---|
State | Superseded |
Headers | show |
Series | virtio-gpu: build pci and vga bits modular too. | expand |
On Fri, Oct 23, 2020 at 10:48 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > Build virtio-gpu vga devices modular. Must be a separate module because > not all qemu softmmu variants come with VGA support. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- > util/module.c | 3 +++ > hw/display/meson.build | 10 ++++++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/util/module.c b/util/module.c > index 9490f975d303..503c399421c5 100644 > --- a/util/module.c > +++ b/util/module.c > @@ -304,6 +304,9 @@ static struct { > { "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" }, > + { "virtio-vga-base", "hw-", "display-virtio-vga" }, > + { "virtio-vga", "hw-", "display-virtio-vga" }, > + { "vhost-user-vga", "hw-", "display-virtio-vga" }, > { "chardev-braille", "chardev-", "baum" }, > { "chardev-spicevmc", "chardev-", "spice" }, > { "chardev-spiceport", "chardev-", "spice" }, > diff --git a/hw/display/meson.build b/hw/display/meson.build > index 669935371335..11ea2895c5fe 100644 > --- a/hw/display/meson.build > +++ b/hw/display/meson.build > @@ -71,8 +71,14 @@ if config_all_devices.has_key('CONFIG_VIRTIO_PCI') > 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')) > +if config_all_devices.has_key('CONFIG_VIRTIO_VGA') > + virtio_vga_ss = ss.source_set() > + virtio_vga_ss.add(when: 'CONFIG_VIRTIO_VGA', > + if_true: [files('virtio-vga.c'), pixman]) > + virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA', > + if_true: files('vhost-user-vga.c')) > + hw_display_modules += {'virtio-vga': virtio_vga_ss} > +endif > > 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 > > > -- Marc-André Lureau <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 23, 2020 at 10:48 AM Gerd Hoffmann <<a href="mailto:kraxel@redhat.com">kraxel@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Build virtio-gpu vga devices modular. Must be a separate module because<br> not all qemu softmmu variants come with VGA support.<br> <br> Signed-off-by: Gerd Hoffmann <<a href="mailto:kraxel@redhat.com" target="_blank">kraxel@redhat.com</a>><br></blockquote><div><br></div><div>Reviewed-by: Marc-André Lureau <<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> ---<br> util/module.c | 3 +++<br> hw/display/meson.build | 10 ++++++++--<br> 2 files changed, 11 insertions(+), 2 deletions(-)<br> <br> diff --git a/util/module.c b/util/module.c<br> index 9490f975d303..503c399421c5 100644<br> --- a/util/module.c<br> +++ b/util/module.c<br> @@ -304,6 +304,9 @@ static struct {<br> { "virtio-gpu-pci-base", "hw-", "display-virtio-gpu-pci" },<br> { "virtio-gpu-pci", "hw-", "display-virtio-gpu-pci" },<br> { "vhost-user-gpu-pci", "hw-", "display-virtio-gpu-pci" },<br> + { "virtio-vga-base", "hw-", "display-virtio-vga" },<br> + { "virtio-vga", "hw-", "display-virtio-vga" },<br> + { "vhost-user-vga", "hw-", "display-virtio-vga" },<br> { "chardev-braille", "chardev-", "baum" },<br> { "chardev-spicevmc", "chardev-", "spice" },<br> { "chardev-spiceport", "chardev-", "spice" },<br> diff --git a/hw/display/meson.build b/hw/display/meson.build<br> index 669935371335..11ea2895c5fe 100644<br> --- a/hw/display/meson.build<br> +++ b/hw/display/meson.build<br> @@ -71,8 +71,14 @@ if config_all_devices.has_key('CONFIG_VIRTIO_PCI')<br> hw_display_modules += {'virtio-gpu-pci': virtio_gpu_pci_ss}<br> endif<br> <br> -softmmu_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c'))<br> -softmmu_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c'))<br> +if config_all_devices.has_key('CONFIG_VIRTIO_VGA')<br> + virtio_vga_ss = ss.source_set()<br> + virtio_vga_ss.add(when: 'CONFIG_VIRTIO_VGA',<br> + if_true: [files('virtio-vga.c'), pixman])<br> + virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA',<br> + if_true: files('vhost-user-vga.c'))<br> + hw_display_modules += {'virtio-vga': virtio_vga_ss}<br> +endif<br> <br> specific_ss.add(when: [x11, opengl, 'CONFIG_MILKYMIST_TMU2'], if_true: files('milkymist-tmu2.c'))<br> specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))<br> -- <br> 2.27.0<br> <br> <br> </blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Marc-André Lureau<br></div></div>
diff --git a/util/module.c b/util/module.c index 9490f975d303..503c399421c5 100644 --- a/util/module.c +++ b/util/module.c @@ -304,6 +304,9 @@ static struct { { "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" }, + { "virtio-vga-base", "hw-", "display-virtio-vga" }, + { "virtio-vga", "hw-", "display-virtio-vga" }, + { "vhost-user-vga", "hw-", "display-virtio-vga" }, { "chardev-braille", "chardev-", "baum" }, { "chardev-spicevmc", "chardev-", "spice" }, { "chardev-spiceport", "chardev-", "spice" }, diff --git a/hw/display/meson.build b/hw/display/meson.build index 669935371335..11ea2895c5fe 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -71,8 +71,14 @@ if config_all_devices.has_key('CONFIG_VIRTIO_PCI') 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')) +if config_all_devices.has_key('CONFIG_VIRTIO_VGA') + virtio_vga_ss = ss.source_set() + virtio_vga_ss.add(when: 'CONFIG_VIRTIO_VGA', + if_true: [files('virtio-vga.c'), pixman]) + virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA', + if_true: files('vhost-user-vga.c')) + hw_display_modules += {'virtio-vga': virtio_vga_ss} +endif 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'))
Build virtio-gpu vga devices modular. Must be a separate module because not all qemu softmmu variants come with VGA support. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- util/module.c | 3 +++ hw/display/meson.build | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)