From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrU1k-00049X-Lx for qemu-devel@nongnu.org; Tue, 25 Jun 2013 10:15:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrU1j-0002nz-1h for qemu-devel@nongnu.org; Tue, 25 Jun 2013 10:15:24 -0400 Received: from mail-ea0-x229.google.com ([2a00:1450:4013:c01::229]:54635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrU1i-0002mi-G3 for qemu-devel@nongnu.org; Tue, 25 Jun 2013 10:15:22 -0400 Received: by mail-ea0-f169.google.com with SMTP id h15so6987469eak.28 for ; Tue, 25 Jun 2013 07:15:21 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 25 Jun 2013 16:14:46 +0200 Message-Id: <1372169705-7645-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1372169705-7645-1-git-send-email-pbonzini@redhat.com> References: <1372169705-7645-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 05/24] vga: pass owner to vga_init_vbe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, alex.williamson@redhat.com Signed-off-by: Paolo Bonzini --- hw/display/vga-isa-mm.c | 2 +- hw/display/vga-isa.c | 2 +- hw/display/vga-pci.c | 2 +- hw/display/vga.c | 4 ++-- hw/display/vga_int.h | 2 +- hw/display/vmware_vga.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/display/vga-isa-mm.c b/hw/display/vga-isa-mm.c index 695c128..8b514cc 100644 --- a/hw/display/vga-isa-mm.c +++ b/hw/display/vga-isa-mm.c @@ -137,6 +137,6 @@ int isa_vga_mm_init(hwaddr vram_base, s->vga.con = graphic_console_init(NULL, s->vga.hw_ops, s); - vga_init_vbe(&s->vga, address_space); + vga_init_vbe(&s->vga, NULL, address_space); return 0; } diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index fbf6db5..5f253a9 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@ -69,7 +69,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp) memory_region_set_coalescing(vga_io_memory); s->con = graphic_console_init(DEVICE(dev), s->hw_ops, s); - vga_init_vbe(s, isa_address_space(isadev)); + vga_init_vbe(s, OBJECT(dev), isa_address_space(isadev)); /* ROM BIOS */ rom_add_vga(VGABIOS_FILENAME); } diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 62652bd..3e150ab 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -173,7 +173,7 @@ static int pci_std_vga_initfn(PCIDevice *dev) if (!dev->rom_bar) { /* compatibility with pc-0.13 and older */ - vga_init_vbe(s, pci_address_space(dev)); + vga_init_vbe(s, OBJECT(dev), pci_address_space(dev)); } return 0; diff --git a/hw/display/vga.c b/hw/display/vga.c index d3e0f33..ce3ca7e 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -2380,12 +2380,12 @@ void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space, } } -void vga_init_vbe(VGACommonState *s, MemoryRegion *system_memory) +void vga_init_vbe(VGACommonState *s, Object *obj, MemoryRegion *system_memory) { /* With pc-0.12 and below we map both the PCI BAR and the fixed VBE region, * so use an alias to avoid double-mapping the same region. */ - memory_region_init_alias(&s->vram_vbe, NULL, "vram.vbe", + memory_region_init_alias(&s->vram_vbe, obj, "vram.vbe", &s->vram, 0, memory_region_size(&s->vram)); /* XXX: use optimized standard vga accesses */ memory_region_add_subregion(system_memory, diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index bac366c..5121a35 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -198,7 +198,7 @@ void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2); int vga_ioport_invalid(VGACommonState *s, uint32_t addr); -void vga_init_vbe(VGACommonState *s, MemoryRegion *address_space); +void vga_init_vbe(VGACommonState *s, Object *obj, MemoryRegion *address_space); uint32_t vbe_ioport_read_data(void *opaque, uint32_t addr); void vbe_ioport_write_index(void *opaque, uint32_t addr, uint32_t val); void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val); diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index ce97870..714908f 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1272,7 +1272,7 @@ static int pci_vmsvga_initfn(PCIDevice *dev) if (!dev->rom_bar) { /* compatibility with pc-0.13 and older */ - vga_init_vbe(&s->chip.vga, pci_address_space(dev)); + vga_init_vbe(&s->chip.vga, OBJECT(dev), pci_address_space(dev)); } return 0; -- 1.8.1.4