From cdb1fba0844bb1db71f67d35700a80838d185bbd Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Mon, 23 Aug 2021 12:04:53 +0200 Subject: hw/display: Restrict virtio-gpu-udmabuf stubs to !Linux When using qemu configured with --enabled-modules, the generic stubs are used instead of the module symbols: qemu-system-x86_64: -device virtio-vga,blob=on: cannot enable blob resources without udmabuf Restrict the stubs to Linux and only link them when CONFIG_VIRTIO_GPU is disabled (only the modularized version is available when it is enabled). Reported-by: Maxim R. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/553 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210823100454.615816-2-philmd@redhat.com> Signed-off-by: Gerd Hoffmann --- stubs/meson.build | 1 - stubs/virtio-gpu-udmabuf.c | 27 --------------------------- 2 files changed, 28 deletions(-) delete mode 100644 stubs/virtio-gpu-udmabuf.c (limited to 'stubs') diff --git a/stubs/meson.build b/stubs/meson.build index 717bfa9a99..275ac89c16 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -52,7 +52,6 @@ if have_system stub_ss.add(files('semihost.c')) stub_ss.add(files('usb-dev-stub.c')) stub_ss.add(files('xen-hw-stub.c')) - stub_ss.add(files('virtio-gpu-udmabuf.c')) else stub_ss.add(files('qdev.c')) endif diff --git a/stubs/virtio-gpu-udmabuf.c b/stubs/virtio-gpu-udmabuf.c deleted file mode 100644 index 81f661441a..0000000000 --- a/stubs/virtio-gpu-udmabuf.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "qemu/osdep.h" -#include "hw/virtio/virtio-gpu.h" - -bool virtio_gpu_have_udmabuf(void) -{ - /* nothing (stub) */ - return false; -} - -void virtio_gpu_init_udmabuf(struct virtio_gpu_simple_resource *res) -{ - /* nothing (stub) */ -} - -void virtio_gpu_fini_udmabuf(struct virtio_gpu_simple_resource *res) -{ - /* nothing (stub) */ -} - -int virtio_gpu_update_dmabuf(VirtIOGPU *g, - uint32_t scanout_id, - struct virtio_gpu_simple_resource *res, - struct virtio_gpu_framebuffer *fb) -{ - /* nothing (stub) */ - return 0; -} -- cgit v1.2.3-55-g7522