[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 27/39] hw/qxl.c: convert to PCIDeviceInfo to init
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v3 27/39] hw/qxl.c: convert to PCIDeviceInfo to initialize ids |
Date: |
Wed, 25 May 2011 10:58:24 +0900 |
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/qxl.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index fe4212b..63cffc3 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1233,7 +1233,6 @@ static int qxl_init_common(PCIQXLDevice *qxl)
break;
}
- pci_config_set_vendor_id(config, REDHAT_PCI_VENDOR_ID);
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);
@@ -1310,7 +1309,6 @@ static int qxl_init_primary(PCIDevice *dev)
qxl0 = qxl;
register_displaychangelistener(vga->ds, &display_listener);
- pci_config_set_class(dev->config, PCI_CLASS_DISPLAY_VGA);
return qxl_init_common(qxl);
}
@@ -1330,7 +1328,6 @@ static int qxl_init_secondary(PCIDevice *dev)
qxl->vga.vram_size);
qxl->vga.vram_ptr = qemu_get_ram_ptr(qxl->vga.vram_offset);
- pci_config_set_class(dev->config, PCI_CLASS_DISPLAY_OTHER);
return qxl_init_common(qxl);
}
@@ -1493,6 +1490,8 @@ static PCIDeviceInfo qxl_info_primary = {
.init = qxl_init_primary,
.config_write = qxl_write_config,
.romfile = "vgabios-qxl.bin",
+ .vendor_id = REDHAT_PCI_VENDOR_ID,
+ .class_id = PCI_CLASS_DISPLAY_VGA,
.qdev.props = (Property[]) {
DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * 1024
* 1024),
DEFINE_PROP_UINT32("vram_size", PCIQXLDevice, vram_size, 64 * 1024 *
1024),
@@ -1511,6 +1510,8 @@ static PCIDeviceInfo qxl_info_secondary = {
.qdev.reset = qxl_reset_handler,
.qdev.vmsd = &qxl_vmstate,
.init = qxl_init_secondary,
+ .vendor_id = REDHAT_PCI_VENDOR_ID,
+ .class_id = PCI_CLASS_DISPLAY_OTHER,
.qdev.props = (Property[]) {
DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * 1024
* 1024),
DEFINE_PROP_UINT32("vram_size", PCIQXLDevice, vram_size, 64 * 1024 *
1024),
--
1.7.1.1
- [Qemu-devel] [PATCH v3 33/39] hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids, (continued)
- [Qemu-devel] [PATCH v3 33/39] hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 24/39] hw/pcnet-pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 17/39] hw/ide/ich.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 25/39] hw/piix4.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 29/39] hw/sh_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 14/39] hw/grackle_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 15/39] hw/gt64xxx.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 31/39] hw/unin_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 36/39] hw/wdt_i6300esb.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 37/39] hw/xio3130_downstream.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 27/39] hw/qxl.c: convert to PCIDeviceInfo to initialize ids,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v3 23/39] hw/ne2000.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 28/39] hw/rtl8139.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 32/39] hw/usb-ohci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 38/39] hw/xio3130_upstream.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 05/39] apb_pci: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 08/39] hw/ac97.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 09/39] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 10/39] hw/bonito.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 02/39] usb-uhci: convert to PCIDEviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 39/39] virtio-pci.c: convert to PCIDEviceInfo to initialize ids, Isaku Yamahata, 2011/05/24