summaryrefslogtreecommitdiffstats
path: root/hw/vga-isa-mm.c
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-isa-mm.c
parente9c6149f6ae6873f14a12eea554925b6aa4c4dec (diff)
downloadhqemu-4a1e244eb65c646bdd938d9d137ace42d76c95a7.zip
hqemu-4a1e244eb65c646bdd938d9d137ace42d76c95a7.tar.gz
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-isa-mm.c')
-rw-r--r--hw/vga-isa-mm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/vga-isa-mm.c b/hw/vga-isa-mm.c
index f8984c6..44ae7d9 100644
--- a/hw/vga-isa-mm.c
+++ b/hw/vga-isa-mm.c
@@ -28,6 +28,8 @@
#include "pixel_ops.h"
#include "qemu-timer.h"
+#define VGA_RAM_SIZE (8192 * 1024)
+
typedef struct ISAVGAMMState {
VGACommonState vga;
int it_shift;
@@ -128,7 +130,8 @@ int isa_vga_mm_init(target_phys_addr_t vram_base,
s = g_malloc0(sizeof(*s));
- vga_common_init(&s->vga, VGA_RAM_SIZE);
+ s->vga.vram_size_mb = VGA_RAM_SIZE >> 20;
+ vga_common_init(&s->vga);
vga_mm_init(s, vram_base, ctrl_base, it_shift, address_space);
s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
OpenPOWER on IntegriCloud