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