qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 2/6] vga-pci: use PCI_VGA_MMIO_SIZE


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH v2 2/6] vga-pci: use PCI_VGA_MMIO_SIZE
Date: Tue, 22 May 2018 18:50:54 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 hw/display/vga-pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index fb3e4cd400..700ac58c69 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -232,7 +232,8 @@ static void pci_std_vga_realize(PCIDevice *dev, Error 
**errp)
 
     /* mmio bar for vga register access */
     if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_MMIO)) {
-        memory_region_init(&d->mmio, NULL, "vga.mmio", 4096);
+        memory_region_init(&d->mmio, NULL, "vga.mmio",
+                           PCI_VGA_MMIO_SIZE);
 
         if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
             qext = true;
@@ -267,7 +268,8 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error 
**errp)
     s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s);
 
     /* mmio bar */
-    memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio", 4096);
+    memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio",
+                       PCI_VGA_MMIO_SIZE);
 
     if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
         qext = true;
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]