From 5643190b74df601719ca713ea21eea4997a26e78 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 8 Apr 2024 17:53:25 +0200 Subject: ramfb: move stubs out of stubs/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-14-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- hw/display/meson.build | 2 +- hw/display/ramfb-stubs.c | 15 +++++++++++++++ stubs/meson.build | 1 - stubs/ramfb.c | 15 --------------- 4 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 hw/display/ramfb-stubs.c delete mode 100644 stubs/ramfb.c diff --git a/hw/display/meson.build b/hw/display/meson.build index f93a69f..4751aab 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -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 index 0000000..cf64733 --- /dev/null +++ b/hw/display/ramfb-stubs.c @@ -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; +} diff --git a/stubs/meson.build b/stubs/meson.build index 84ecaa4..9288766 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -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 index cf64733..0000000 --- a/stubs/ramfb.c +++ /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; -} -- cgit v1.1