]> git.proxmox.com Git - mirror_qemu.git/commitdiff
modules: add have_vga
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 30 Apr 2021 11:35:46 +0000 (13:35 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 10 May 2021 11:55:28 +0000 (13:55 +0200)
Introduce a symbol which can be used to prevent display modules which
need vga support being loaded into system emulators with CONFIG_VGA=n.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20210430113547.1816178-1-kraxel@redhat.com
Message-Id: <20210430113547.1816178-16-kraxel@redhat.com>

hw/display/vga.c
include/hw/display/vga.h

index 836ad50c7b6d8cd127eabdfe74ebe2fc4115c0be..28a90e30d0cf76b13d8f7e653286b5ad9f03f7e9 100644 (file)
@@ -39,6 +39,8 @@
 //#define DEBUG_VGA_MEM
 //#define DEBUG_VGA_REG
 
+bool have_vga = true;
+
 /* 16 state changes per vertical frame @60 Hz */
 #define VGA_TEXT_CURSOR_PERIOD_MS       (1000 * 2 * 16 / 60)
 
index ca0003dbfd92e9a39bdf400d7aee5dedbfaffd40..5f7825e0e3683e5ecfd40cb42021ea8de6767c95 100644 (file)
 
 #include "exec/hwaddr.h"
 
+/*
+ * modules can reference this symbol to avoid being loaded
+ * into system emulators without vga support
+ */
+extern bool have_vga;
+
 enum vga_retrace_method {
     VGA_RETRACE_DUMB,
     VGA_RETRACE_PRECISE