Skip to content

Commit

Permalink
modules: add have_vga
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kraxel committed May 10, 2021
1 parent 17cdac0 commit 48ecfbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/display/vga.c
Expand Up @@ -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)

Expand Down
6 changes: 6 additions & 0 deletions include/hw/display/vga.h
Expand Up @@ -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
Expand Down

0 comments on commit 48ecfbf

Please sign in to comment.