mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init, instead of a bunch of function pointers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
27be55872d
commit
380cd056ec
26 changed files with 155 additions and 104 deletions
|
@ -384,6 +384,11 @@ void omap_lcdc_reset(struct omap_lcd_panel_s *s)
|
|||
s->ctrl = 0;
|
||||
}
|
||||
|
||||
static const GraphicHwOps omap_ops = {
|
||||
.invalidate = omap_invalidate_display,
|
||||
.gfx_update = omap_update_display,
|
||||
};
|
||||
|
||||
struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem,
|
||||
hwaddr base,
|
||||
qemu_irq irq,
|
||||
|
@ -401,9 +406,7 @@ struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem,
|
|||
memory_region_init_io(&s->iomem, &omap_lcdc_ops, s, "omap.lcdc", 0x100);
|
||||
memory_region_add_subregion(sysmem, base, &s->iomem);
|
||||
|
||||
s->con = graphic_console_init(omap_update_display,
|
||||
omap_invalidate_display,
|
||||
NULL, s);
|
||||
s->con = graphic_console_init(&omap_ops, s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue