diff options
-rw-r--r-- | hw/s390x/meson.build | 8 | ||||
-rw-r--r-- | hw/s390x/virtio-ccw-gpu.c | 4 | ||||
-rw-r--r-- | util/module.c | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index 91495b5..327e9c9 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -34,7 +34,6 @@ virtio_ss.add(files('virtio-ccw.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-ccw-balloon.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-ccw-blk.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-ccw-crypto.c')) -virtio_ss.add(when: 'CONFIG_VIRTIO_GPU', if_true: files('virtio-ccw-gpu.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-ccw-input.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-ccw-net.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-ccw-rng.c')) @@ -48,3 +47,10 @@ virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-ccw.c' s390x_ss.add_all(when: 'CONFIG_VIRTIO_CCW', if_true: virtio_ss) hw_arch += {'s390x': s390x_ss} + +hw_s390x_modules = {} +virtio_gpu_ccw_ss = ss.source_set() +virtio_gpu_ccw_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_CCW'], + if_true: [files('virtio-ccw-gpu.c'), pixman]) +hw_s390x_modules += {'virtio-gpu-ccw': virtio_gpu_ccw_ss} +modules += {'hw-s390x': hw_s390x_modules} diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index c301e25..75a9e4b 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -62,7 +62,9 @@ static const TypeInfo virtio_ccw_gpu = { static void virtio_ccw_gpu_register(void) { - type_register_static(&virtio_ccw_gpu); + if (have_virtio_ccw) { + type_register_static(&virtio_ccw_gpu); + } } type_init(virtio_ccw_gpu_register) diff --git a/util/module.c b/util/module.c index c65060c..cbe89fe 100644 --- a/util/module.c +++ b/util/module.c @@ -304,6 +304,7 @@ 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-gpu-ccw", "hw-", "s390x-virtio-gpu-ccw" }, { "virtio-vga-base", "hw-", "display-virtio-vga" }, { "virtio-vga", "hw-", "display-virtio-vga" }, { "vhost-user-vga", "hw-", "display-virtio-vga" }, |