qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 24/25] modules: add have_vga


From: Gerd Hoffmann
Subject: [PULL 24/25] modules: add have_vga
Date: Mon, 10 May 2021 15:20:50 +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>
---
 include/hw/display/vga.h | 6 ++++++
 hw/display/vga.c         | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/include/hw/display/vga.h b/include/hw/display/vga.h
index ca0003dbfd92..5f7825e0e368 100644
--- a/include/hw/display/vga.h
+++ b/include/hw/display/vga.h
@@ -11,6 +11,12 @@
 
 #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
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 836ad50c7b6d..28a90e30d0cf 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -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)
 
-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]