qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH v2 3/4] stdvga: move common properties to common base class
Date: Thu,  9 Mar 2017 09:38:29 +0100	[thread overview]
Message-ID: <1489048710-22084-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1489048710-22084-1-git-send-email-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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

  parent reply	other threads:[~2017-03-09  8:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09  8:38 [Qemu-devel] [PATCH v2 0/4] vga: make display size configurable Gerd Hoffmann
2017-03-09  8:38 ` [Qemu-devel] [PATCH v2 1/4] virtio-gpu: add xres and yres properties Gerd Hoffmann
2017-03-09  8:38 ` [Qemu-devel] [PATCH v2 2/4] qxl: " Gerd Hoffmann
2017-03-09  8:38 ` Gerd Hoffmann [this message]
2017-03-09  8:38 ` [Qemu-devel] [PATCH v2 4/4] [RfC] stdvga: " Gerd Hoffmann
2017-03-09 21:03   ` Hervé Poussineau
2017-03-13 15:17     ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489048710-22084-4-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).