From patchwork Thu Mar 9 08:38:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 9612721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE1EC604D9 for ; Thu, 9 Mar 2017 08:41:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A241285B5 for ; Thu, 9 Mar 2017 08:41:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F20B285D4; Thu, 9 Mar 2017 08:41:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2104D285B5 for ; Thu, 9 Mar 2017 08:41:16 +0000 (UTC) Received: from localhost ([::1]:32771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cltdL-00087v-9x for patchwork-qemu-devel@patchwork.kernel.org; Thu, 09 Mar 2017 03:41:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cltaw-0006SD-ED for qemu-devel@nongnu.org; Thu, 09 Mar 2017 03:38:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cltar-00011p-GD for qemu-devel@nongnu.org; Thu, 09 Mar 2017 03:38:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56224) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cltar-00011N-A9 for qemu-devel@nongnu.org; Thu, 09 Mar 2017 03:38:41 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 44971C04BD2B for ; Thu, 9 Mar 2017 08:38:41 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-80.ams2.redhat.com [10.36.116.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id 800FF2D654; Thu, 9 Mar 2017 08:38:40 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 1DBDD805BC; Thu, 9 Mar 2017 09:38:35 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 9 Mar 2017 09:38:29 +0100 Message-Id: <1489048710-22084-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1489048710-22084-1-git-send-email-kraxel@redhat.com> References: <1489048710-22084-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 09 Mar 2017 08:38:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 3/4] stdvga: move common properties to common base class X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Gerd Hoffmann --- 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; }