mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
vga: allow non-global vmstate
Need a way to opt-out from vga.vram being global vmstate, for secondary vga cards. Add a bool parameter to vga_common_init to support this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
411f491e0a
commit
e2bbfc8ee2
8 changed files with 10 additions and 10 deletions
|
@ -2252,7 +2252,7 @@ static const GraphicHwOps vga_ops = {
|
|||
.text_update = vga_update_text,
|
||||
};
|
||||
|
||||
void vga_common_init(VGACommonState *s, Object *obj)
|
||||
void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate)
|
||||
{
|
||||
int i, j, v, b;
|
||||
|
||||
|
@ -2289,7 +2289,7 @@ void vga_common_init(VGACommonState *s, Object *obj)
|
|||
|
||||
s->is_vbe_vmstate = 1;
|
||||
memory_region_init_ram(&s->vram, obj, "vga.vram", s->vram_size);
|
||||
vmstate_register_ram_global(&s->vram);
|
||||
vmstate_register_ram(&s->vram, global_vmstate ? NULL : DEVICE(obj));
|
||||
xen_register_framebuffer(&s->vram);
|
||||
s->vram_ptr = memory_region_get_ram_ptr(&s->vram);
|
||||
s->get_bpp = vga_get_bpp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue