vga: pass owner to vga_init
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
		
							parent
							
								
									3cf63ff25c
								
							
						
					
					
						commit
						712f0cc777
					
				| 
						 | 
					@ -2068,7 +2068,8 @@ static int qxl_init_primary(PCIDevice *dev)
 | 
				
			||||||
    qxl_init_ramsize(qxl);
 | 
					    qxl_init_ramsize(qxl);
 | 
				
			||||||
    vga->vram_size_mb = qxl->vga.vram_size >> 20;
 | 
					    vga->vram_size_mb = qxl->vga.vram_size >> 20;
 | 
				
			||||||
    vga_common_init(vga);
 | 
					    vga_common_init(vga);
 | 
				
			||||||
    vga_init(vga, pci_address_space(dev), pci_address_space_io(dev), false);
 | 
					    vga_init(vga, OBJECT(dev),
 | 
				
			||||||
 | 
					             pci_address_space(dev), pci_address_space_io(dev), false);
 | 
				
			||||||
    portio_list_init(qxl_vga_port_list, qxl_vga_portio_list, vga, "vga");
 | 
					    portio_list_init(qxl_vga_port_list, qxl_vga_portio_list, vga, "vga");
 | 
				
			||||||
    portio_list_add(qxl_vga_port_list, pci_address_space_io(dev), 0x3b0);
 | 
					    portio_list_add(qxl_vga_port_list, pci_address_space_io(dev), 0x3b0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -148,7 +148,8 @@ static int pci_std_vga_initfn(PCIDevice *dev)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* vga + console init */
 | 
					    /* vga + console init */
 | 
				
			||||||
    vga_common_init(s);
 | 
					    vga_common_init(s);
 | 
				
			||||||
    vga_init(s, pci_address_space(dev), pci_address_space_io(dev), true);
 | 
					    vga_init(s, OBJECT(dev), pci_address_space(dev), pci_address_space_io(dev),
 | 
				
			||||||
 | 
					             true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    s->con = graphic_console_init(DEVICE(dev), s->hw_ops, s);
 | 
					    s->con = graphic_console_init(DEVICE(dev), s->hw_ops, s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2350,7 +2350,7 @@ MemoryRegion *vga_init_io(VGACommonState *s,
 | 
				
			||||||
    return vga_mem;
 | 
					    return vga_mem;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vga_init(VGACommonState *s, MemoryRegion *address_space,
 | 
					void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
 | 
				
			||||||
              MemoryRegion *address_space_io, bool init_vga_ports)
 | 
					              MemoryRegion *address_space_io, bool init_vga_ports)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    MemoryRegion *vga_io_memory;
 | 
					    MemoryRegion *vga_io_memory;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -178,7 +178,7 @@ static inline int c6_to_8(int v)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vga_common_init(VGACommonState *s);
 | 
					void vga_common_init(VGACommonState *s);
 | 
				
			||||||
void vga_init(VGACommonState *s, MemoryRegion *address_space,
 | 
					void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
 | 
				
			||||||
              MemoryRegion *address_space_io, bool init_vga_ports);
 | 
					              MemoryRegion *address_space_io, bool init_vga_ports);
 | 
				
			||||||
MemoryRegion *vga_init_io(VGACommonState *s,
 | 
					MemoryRegion *vga_init_io(VGACommonState *s,
 | 
				
			||||||
                          const MemoryRegionPortio **vga_ports,
 | 
					                          const MemoryRegionPortio **vga_ports,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1199,7 +1199,7 @@ static void vmsvga_init(DeviceState *dev, struct vmsvga_state_s *s,
 | 
				
			||||||
    s->fifo_ptr = memory_region_get_ram_ptr(&s->fifo_ram);
 | 
					    s->fifo_ptr = memory_region_get_ram_ptr(&s->fifo_ram);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    vga_common_init(&s->vga);
 | 
					    vga_common_init(&s->vga);
 | 
				
			||||||
    vga_init(&s->vga, address_space, io, true);
 | 
					    vga_init(&s->vga, OBJECT(dev), address_space, io, true);
 | 
				
			||||||
    vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
 | 
					    vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
 | 
				
			||||||
    s->new_depth = 32;
 | 
					    s->new_depth = 32;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue