cryptospore / rpms / qemu-kvm

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