ramfb: move stubs out of stubs/
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 8 Apr 2024 15:53:25 +0000 (17:53 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Apr 2024 09:17:27 +0000 (11:17 +0200)
Since the ramfb stubs are needed exactly when the Kconfig symbols are not
needed, move them to hw/display/ and compile them when ramfb.c is absent.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240408155330.522792-14-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/display/meson.build
hw/display/ramfb-stubs.c [new file with mode: 0644]
stubs/meson.build
stubs/ramfb.c [deleted file]

index f93a69f70f4f3d2577fa69de3349d98e2bc9501c..4751aab3ba98735e773a474690b26d627f90b498 100644 (file)
@@ -3,7 +3,7 @@ hw_display_modules = {}
 system_ss.add(when: 'CONFIG_DDC', if_true: files('i2c-ddc.c'))
 system_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-region.c'))
 
-system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
+system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'), if_false: files('ramfb-stubs.c'))
 system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
 
 system_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
diff --git a/hw/display/ramfb-stubs.c b/hw/display/ramfb-stubs.c
new file mode 100644 (file)
index 0000000..cf64733
--- /dev/null
@@ -0,0 +1,15 @@
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "hw/display/ramfb.h"
+
+const VMStateDescription ramfb_vmstate = {};
+
+void ramfb_display_update(QemuConsole *con, RAMFBState *s)
+{
+}
+
+RAMFBState *ramfb_setup(Error **errp)
+{
+    error_setg(errp, "ramfb support not available");
+    return NULL;
+}
index 84ecaa4daa1bdb653d50b87e9ef941568155b24b..92887660e41c605014195e80de93456f0f45403b 100644 (file)
@@ -36,7 +36,6 @@ stub_ss.add(files('qmp-command-available.c'))
 stub_ss.add(files('qmp-quit.c'))
 stub_ss.add(files('qtest.c'))
 stub_ss.add(files('ram-block.c'))
-stub_ss.add(files('ramfb.c'))
 stub_ss.add(files('replay.c'))
 stub_ss.add(files('runstate-check.c'))
 stub_ss.add(files('sysbus.c'))
diff --git a/stubs/ramfb.c b/stubs/ramfb.c
deleted file mode 100644 (file)
index cf64733..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "qemu/osdep.h"
-#include "qapi/error.h"
-#include "hw/display/ramfb.h"
-
-const VMStateDescription ramfb_vmstate = {};
-
-void ramfb_display_update(QemuConsole *con, RAMFBState *s)
-{
-}
-
-RAMFBState *ramfb_setup(Error **errp)
-{
-    error_setg(errp, "ramfb support not available");
-    return NULL;
-}