qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 3/4] stdvga: move common properties to common bas


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH v2 3/4] stdvga: move common properties to common base class
Date: Thu, 9 Mar 2017 09:38:29 +0100

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

diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index ac9a764..8500362 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -306,15 +306,12 @@ static void pci_secondary_vga_reset(DeviceState *dev)
     vga_common_reset(&d->vga);
 }
 
-static Property vga_pci_properties[] = {
-    DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
+static Property vga_pci_primary_properties[] = {
     DEFINE_PROP_BIT("mmio", PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_MMIO, 
true),
-    DEFINE_PROP_BIT("qemu-extended-regs",
-                    PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_QEXT, true),
     DEFINE_PROP_END_OF_LIST(),
 };
 
-static Property secondary_pci_properties[] = {
+static Property vga_pci_common_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
     DEFINE_PROP_BIT("qemu-extended-regs",
                     PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_QEXT, true),
@@ -329,6 +326,7 @@ static void vga_pci_class_init(ObjectClass *klass, void 
*data)
     k->vendor_id = PCI_VENDOR_ID_QEMU;
     k->device_id = PCI_DEVICE_ID_QEMU_VGA;
     dc->vmsd = &vmstate_vga_pci;
+    dc->props = vga_pci_common_properties;
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
@@ -348,7 +346,7 @@ static void vga_class_init(ObjectClass *klass, void *data)
     k->realize = pci_std_vga_realize;
     k->romfile = "vgabios-stdvga.bin";
     k->class_id = PCI_CLASS_DISPLAY_VGA;
-    dc->props = vga_pci_properties;
+    dc->props = vga_pci_primary_properties;
     dc->hotpluggable = false;
 }
 
@@ -359,7 +357,6 @@ static void secondary_class_init(ObjectClass *klass, void 
*data)
 
     k->realize = pci_secondary_vga_realize;
     k->class_id = PCI_CLASS_DISPLAY_OTHER;
-    dc->props = secondary_pci_properties;
     dc->reset = pci_secondary_vga_reset;
 }
 
-- 
1.8.3.1




reply via email to

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