ae23c9
From e924798dc9091c09e4e6968b9357e89aac6a5c03 Mon Sep 17 00:00:00 2001
ae23c9
From: Gerd Hoffmann <kraxel@redhat.com>
ae23c9
Date: Wed, 13 Jun 2018 10:40:26 +0200
ae23c9
Subject: [PATCH 007/268] Use 4 MB vram for cirrus.
ae23c9
ae23c9
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
ae23c9
Message-id: <20180613104026.4395-3-kraxel@redhat.com>
ae23c9
Patchwork-id: 80652
ae23c9
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 2/2] Use 4 MB vram for cirrus.
ae23c9
Bugzilla: 1542080
ae23c9
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
ae23c9
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ae23c9
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
ae23c9
ae23c9
Follow upstream, which switched from 8 MB to 4 MB in release 2.9,
ae23c9
see commit 73c148130b58709f0f2abfedbae92681d87eb404.
ae23c9
ae23c9
RHEL traditionally defaults to 16 MB video memory, so we had a patch
ae23c9
changing 8 MB -> 16 MB downstream.  The 2.9 rebase kept that patch, now
ae23c9
changing 4 MB -> 16 MB.
ae23c9
ae23c9
This patch effectively reverts the downstream change and adds a compat
ae23c9
property so the video memory will stay at 16 MB for 7.5 and older
ae23c9
machine types.
ae23c9
ae23c9
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ae23c9
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
ae23c9
---
ae23c9
 hw/display/cirrus_vga.c | 2 +-
ae23c9
 include/hw/compat.h     | 4 ++++
ae23c9
 2 files changed, 5 insertions(+), 1 deletion(-)
ae23c9
ae23c9
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
ae23c9
index feacb45..014268a 100644
ae23c9
--- a/hw/display/cirrus_vga.c
ae23c9
+++ b/hw/display/cirrus_vga.c
ae23c9
@@ -3133,7 +3133,7 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
ae23c9
 
ae23c9
 static Property pci_vga_cirrus_properties[] = {
ae23c9
     DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
ae23c9
-                       cirrus_vga.vga.vram_size_mb, 16),
ae23c9
+                       cirrus_vga.vga.vram_size_mb, 4),
ae23c9
     DEFINE_PROP_BOOL("blitter", struct PCICirrusVGAState,
ae23c9
                      cirrus_vga.enable_blitter, true),
ae23c9
     DEFINE_PROP_END_OF_LIST(),
ae23c9
diff --git a/include/hw/compat.h b/include/hw/compat.h
ae23c9
index f7b39c5..f4cc6e0 100644
ae23c9
--- a/include/hw/compat.h
ae23c9
+++ b/include/hw/compat.h
ae23c9
@@ -472,6 +472,10 @@
ae23c9
         .driver   = "virtio-tablet-device",\
ae23c9
         .property = "wheel-axis",\
ae23c9
         .value    = "false",\
ae23c9
+    },{ /* HW_COMPAT_RHEL7_5 */ \
ae23c9
+        .driver   = "cirrus-vga",\
ae23c9
+        .property = "vgamem_mb",\
ae23c9
+        .value    = "16",\
ae23c9
     },
ae23c9
 
ae23c9
 #endif /* HW_COMPAT_H */
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9