summaryrefslogtreecommitdiffstats
path: root/stubs
diff options
context:
space:
mode:
authorVivek Kasireddy2021-05-27 01:14:19 +0200
committerGerd Hoffmann2021-05-27 12:06:37 +0200
commit9192a40655140b743dfe0b1f921ab3b8b51579bf (patch)
tree5cc357e8593185e644dd5665c4d21ca04b854d4c /stubs
parentvirtio-gpu: Add udmabuf helpers (diff)
downloadqemu-9192a40655140b743dfe0b1f921ab3b8b51579bf.tar.gz
qemu-9192a40655140b743dfe0b1f921ab3b8b51579bf.tar.xz
qemu-9192a40655140b743dfe0b1f921ab3b8b51579bf.zip
stubs: Add stubs for udmabuf helpers
This is needed to ensure that virtio-gpu device works for non-linux builds. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Message-Id: <20210526231429.1045476-5-vivek.kasireddy@intel.com> [ kraxel: add virtio-gpu-udmabuf.c stubs only when building system emulation ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'stubs')
-rw-r--r--stubs/meson.build1
-rw-r--r--stubs/virtio-gpu-udmabuf.c18
2 files changed, 19 insertions, 0 deletions
diff --git a/stubs/meson.build b/stubs/meson.build
index 3faef16892..c32d182585 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -52,6 +52,7 @@ 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
new file mode 100644
index 0000000000..e962e00d86
--- /dev/null
+++ b/stubs/virtio-gpu-udmabuf.c
@@ -0,0 +1,18 @@
+#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) */
+}