aboutsummaryrefslogtreecommitdiff
path: root/hw/display/omap_lcdc.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-03-13 14:04:18 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-04-16 09:03:49 +0200
commit380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 (patch)
treee8097697817029ca6d545b8f68ba9761fb0f8164 /hw/display/omap_lcdc.c
parent27be55872dd747c733a42a3d90864d9f59272d26 (diff)
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>
Diffstat (limited to 'hw/display/omap_lcdc.c')
-rw-r--r--hw/display/omap_lcdc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c
index f76f6135d6..e4a55958fa 100644
--- a/hw/display/omap_lcdc.c
+++ b/hw/display/omap_lcdc.c
@@ -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;
}