aboutsummaryrefslogtreecommitdiff
path: root/hw/vga_int.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-05-24 09:59:44 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-06-22 10:46:12 +0200
commit4a1e244eb65c646bdd938d9d137ace42d76c95a7 (patch)
tree312ebcb456904968061be48cecbee7b5197e26f3 /hw/vga_int.h
parente9c6149f6ae6873f14a12eea554925b6aa4c4dec (diff)
vga: make vram size configurable
Zap the global VGA_RAM_SIZE #define, make the vga ram size configurable for standard vga and vmware vga. cirrus and qxl are left with a fixed size (and private VGA_RAM_SIZE #define) for now. qxl needs some non-trivial adjustments in the mode list handling deal with a runtime-configurable size, which calls for a separate qxl patch. cirrus emulates cards which have 2 MB (isa) and 4 MB (pci), so I guess it would make sense to use these sizes. That change would break migration though, so I left it fixed at 8 MB size. Making it configurabls is pretty pointless for cirrus as we have to match real hardware. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/vga_int.h')
-rw-r--r--hw/vga_int.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/vga_int.h b/hw/vga_int.h
index ce33e66744..3b38764a38 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -107,6 +107,7 @@ typedef struct VGACommonState {
MemoryRegion vram;
MemoryRegion vram_vbe;
uint32_t vram_size;
+ uint32_t vram_size_mb; /* property */
uint32_t latch;
MemoryRegion *chain4_alias;
uint8_t sr_index;
@@ -184,7 +185,7 @@ static inline int c6_to_8(int v)
return (v << 2) | (b << 1) | b;
}
-void vga_common_init(VGACommonState *s, int vga_ram_size);
+void vga_common_init(VGACommonState *s);
void vga_init(VGACommonState *s, MemoryRegion *address_space,
MemoryRegion *address_space_io, bool init_vga_ports);
MemoryRegion *vga_init_io(VGACommonState *s,
@@ -209,7 +210,6 @@ void vga_init_vbe(VGACommonState *s, MemoryRegion *address_space);
extern const uint8_t sr_mask[8];
extern const uint8_t gr_mask[16];
-#define VGA_RAM_SIZE (8192 * 1024)
#define VGABIOS_FILENAME "vgabios.bin"
#define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin"