From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdkqu-0008Hl-2o for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:14:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdkqq-0006j0-99 for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:14:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdkqp-0006iE-Lp for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:14:20 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p64FEIeb013776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Jul 2011 11:14:19 -0400 From: Gerd Hoffmann Date: Mon, 4 Jul 2011 17:14:07 +0200 Message-Id: <1309792455-26825-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1309792455-26825-1-git-send-email-kraxel@redhat.com> References: <1309792455-26825-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/9] qxl: device id fixup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Move device ID to PCIDeviceInfo. Remove support for the unused unstable device ID. Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 16316f2..e95d6f7 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1207,7 +1207,6 @@ static DisplayChangeListener display_listener = { static int qxl_init_common(PCIQXLDevice *qxl) { uint8_t* config = qxl->pci.config; - uint32_t pci_device_id; uint32_t pci_device_rev; uint32_t io_size; @@ -1218,20 +1217,14 @@ static int qxl_init_common(PCIQXLDevice *qxl) switch (qxl->revision) { case 1: /* spice 0.4 -- qxl-1 */ - pci_device_id = QXL_DEVICE_ID_STABLE; pci_device_rev = QXL_REVISION_STABLE_V04; break; case 2: /* spice 0.6 -- qxl-2 */ - pci_device_id = QXL_DEVICE_ID_STABLE; + default: pci_device_rev = QXL_REVISION_STABLE_V06; break; - default: /* experimental */ - pci_device_id = QXL_DEVICE_ID_DEVEL; - pci_device_rev = 1; - break; } - pci_config_set_device_id(config, pci_device_id); pci_set_byte(&config[PCI_REVISION_ID], pci_device_rev); pci_set_byte(&config[PCI_INTERRUPT_PIN], 1); @@ -1492,6 +1485,7 @@ static PCIDeviceInfo qxl_info_primary = { .config_write = qxl_write_config, .romfile = "vgabios-qxl.bin", .vendor_id = REDHAT_PCI_VENDOR_ID, + .device_id = QXL_DEVICE_ID_STABLE, .class_id = PCI_CLASS_DISPLAY_VGA, .qdev.props = (Property[]) { DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * 1024 * 1024), @@ -1512,6 +1506,7 @@ static PCIDeviceInfo qxl_info_secondary = { .qdev.vmsd = &qxl_vmstate, .init = qxl_init_secondary, .vendor_id = REDHAT_PCI_VENDOR_ID, + .device_id = QXL_DEVICE_ID_STABLE, .class_id = PCI_CLASS_DISPLAY_OTHER, .qdev.props = (Property[]) { DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * 1024 * 1024), -- 1.7.1