218e99
From c712cf32b457f67d926b3d54c015371d6683099b Mon Sep 17 00:00:00 2001
218e99
From: Miroslav Rezanina <mrezanin@redhat.com>
218e99
Date: Wed, 31 Jul 2013 08:02:53 +0200
218e99
Subject: vga: Default .vram_size_mb to 16, like prior versions of RHEL
218e99
218e99
Message-id: <1375201922-6794-5-git-send-email-armbru@redhat.com>
218e99
Patchwork-id: 52811
218e99
O-Subject: [RHEL-7 PATCH v3 04/15] vga: Default .vram_size_mb to 16, like prior versions of RHEL
218e99
Bugzilla: 983991
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
RH-Acked-by: Bandan Das <bsd@redhat.com>
218e99
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
218e99
A brief history of VGA video RAM sizes:
218e99
218e99
* Initially, all VGA devices got 8 MiB of video RAM.
218e99
218e99
* Upstream qemu-kvm kvm-62 (2008) doubled it to 16 MiB (commit
218e99
  a7fe029).
218e99
218e99
* RHEL-5 and RHEL-6 based on upstream qemu-kvm.
218e99
218e99
* Upstream qemu v1.2.0 made the size configurable for "isa-vga",
218e99
  "VGA", "vmware_vga" (commit 4a1e244), and "qxl-vga", "qxl" (commit
218e99
  13d1fd4), then doubled the default to 16 MiB (commit 9e56edc) for
218e99
  the new machine type.  Except "isa-vga" stayed at 8 MiB.
218e99
218e99
* Upstream qemu-kvm merged this in qemu-kvm-1.2.0.  Incompatible
218e99
  change of default VGA video RAM back to 8 MiB for "isa-vga",
218e99
  "isa-cirrus-vga", "cirrus-vga"[*].
218e99
218e99
* Upstream qemu v1.3.0 made the size configurable for
218e99
  "isa-cirrus-vga", "cirrus-vga" (commit 19403a6).
218e99
218e99
RHEL-7 bases on upstream qemu.  To avoid qemu-kvm-1.2.0's incompatible
218e99
change, default video RAM size to 16 MiB for all VGA devices[**] and
218e99
RHEL machine types.
218e99
218e99
[*] And the non-qdevified, memory-mapped VGA used by MIPS magnum and
218e99
pica61 machines, but these don't matter in qemu-kvm.
218e99
218e99
[**] Except for the non-qdevified, memory-mapped VGA.
218e99
218e99
Signed-off-by: Markus Armbruster <armbru@redhat.com>
218e99
218e99
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
218e99
index 64bfe2b..fa8eae2 100644
218e99
--- a/hw/display/cirrus_vga.c
218e99
+++ b/hw/display/cirrus_vga.c
218e99
@@ -2924,7 +2924,7 @@ static int vga_initfn(ISADevice *dev)
218e99
 
218e99
 static Property isa_cirrus_vga_properties[] = {
218e99
     DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
218e99
-                       cirrus_vga.vga.vram_size_mb, 8),
218e99
+                       cirrus_vga.vga.vram_size_mb, 16),
218e99
     DEFINE_PROP_END_OF_LIST(),
218e99
 };
218e99
 
218e99
@@ -2986,7 +2986,7 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
218e99
 
218e99
 static Property pci_vga_cirrus_properties[] = {
218e99
     DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
218e99
-                       cirrus_vga.vga.vram_size_mb, 8),
218e99
+                       cirrus_vga.vga.vram_size_mb, 16),
218e99
     DEFINE_PROP_END_OF_LIST(),
218e99
 };
218e99
 
218e99
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
218e99
index 9e63b69..2f34ee3 100644
218e99
--- a/hw/display/vga-isa.c
218e99
+++ b/hw/display/vga-isa.c
218e99
@@ -75,7 +75,7 @@ static int vga_initfn(ISADevice *dev)
218e99
 }
218e99
 
218e99
 static Property vga_isa_properties[] = {
218e99
-    DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8),
218e99
+    DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 16),
218e99
     DEFINE_PROP_END_OF_LIST(),
218e99
 };
218e99
 
218e99
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
218e99
index 96f6bf9..5d57a76 100644
218e99
--- a/hw/i386/pc_piix.c
218e99
+++ b/hw/i386/pc_piix.c
218e99
@@ -888,18 +888,6 @@ static QEMUMachine pc_machine_rhel700 = {
218e99
         .property = "param_change",\
218e99
         .value    = "off",\
218e99
     },{\
218e99
-        .driver   = "VGA",\
218e99
-        .property = "vgamem_mb",\
218e99
-        .value    = stringify(8),\
218e99
-    },{\
218e99
-        .driver   = "qxl-vga",\
218e99
-        .property = "vgamem_mb",\
218e99
-        .value    = stringify(8),\
218e99
-    },{\
218e99
-        .driver   = "qxl",\
218e99
-        .property = "vgamem_mb",\
218e99
-        .value    = stringify(8),\
218e99
-    },{\
218e99
         .driver   = "virtio-blk-pci",\
218e99
         .property = "config-wce",\
218e99
         .value    = "off",\