aboutsummaryrefslogtreecommitdiff
path: root/hw/display/tc6393xb.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/tc6393xb.c
parent27be55872dd747c733a42a3d90864d9f59272d26 (diff)
downloadqemu-380cd056ec0e7fc8bbd553cdcb061d3ca612bb82.zip
qemu-380cd056ec0e7fc8bbd553cdcb061d3ca612bb82.tar.gz
qemu-380cd056ec0e7fc8bbd553cdcb061d3ca612bb82.tar.bz2
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/tc6393xb.c')
-rw-r--r--hw/display/tc6393xb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c
index 01beba4..b5b255c 100644
--- a/hw/display/tc6393xb.c
+++ b/hw/display/tc6393xb.c
@@ -548,6 +548,10 @@ static void tc6393xb_writeb(void *opaque, hwaddr addr,
(uint32_t) addr, (int)value & 0xff);
}
+static const GraphicHwOps tc6393xb_gfx_ops = {
+ .gfx_update = tc6393xb_update_display,
+};
+
TC6393xbState *tc6393xb_init(MemoryRegion *sysmem, uint32_t base, qemu_irq irq)
{
TC6393xbState *s;
@@ -583,10 +587,7 @@ TC6393xbState *tc6393xb_init(MemoryRegion *sysmem, uint32_t base, qemu_irq irq)
memory_region_add_subregion(sysmem, base + 0x100000, &s->vram);
s->scr_width = 480;
s->scr_height = 640;
- s->con = graphic_console_init(tc6393xb_update_display,
- NULL, /* invalidate */
- NULL, /* text_update */
- s);
+ s->con = graphic_console_init(&tc6393xb_gfx_ops, s);
return s;
}