Message ID | 1371477707-7039-2-git-send-email-kraxel@redhat.com |
---|---|
State | New |
Headers | show |
Little more context please. Regards, Anthony Liguori Gerd Hoffmann <kraxel@redhat.com> writes: > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > include/ui/console.h | 2 ++ > ui/console.c | 15 +++++++++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/include/ui/console.h b/include/ui/console.h > index 092b9be..4860687 100644 > --- a/include/ui/console.h > +++ b/include/ui/console.h > @@ -273,6 +273,7 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch) > typedef struct GraphicHwOps { > void (*invalidate)(void *opaque); > void (*gfx_update)(void *opaque); > + void (*gfx_update_notify)(void *opaque, QEMUBH *notify); > void (*text_update)(void *opaque, console_ch_t *text); > void (*update_interval)(void *opaque, uint64_t interval); > } GraphicHwOps; > @@ -282,6 +283,7 @@ QemuConsole *graphic_console_init(DeviceState *dev, > void *opaque); > > void graphic_hw_update(QemuConsole *con); > +void graphic_hw_update_notify(QemuConsole *con, QEMUBH *notify); > void graphic_hw_invalidate(QemuConsole *con); > void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata); > > diff --git a/ui/console.c b/ui/console.c > index 07d4d63..020805c 100644 > --- a/ui/console.c > +++ b/ui/console.c > @@ -255,6 +255,21 @@ void graphic_hw_update(QemuConsole *con) > } > } > > +void graphic_hw_update_notify(QemuConsole *con, QEMUBH *notify) > +{ > + assert(con != NULL); > + > + if (con->hw_ops->gfx_update_notify) { > + con->hw_ops->gfx_update_notify(con->hw, notify); > + return; > + } > + > + if (con->hw_ops->gfx_update) { > + con->hw_ops->gfx_update(con->hw); > + } > + qemu_bh_schedule(notify); > +} > + > void graphic_hw_invalidate(QemuConsole *con) > { > if (!con) { > -- > 1.7.9.7
diff --git a/include/ui/console.h b/include/ui/console.h index 092b9be..4860687 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -273,6 +273,7 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch) typedef struct GraphicHwOps { void (*invalidate)(void *opaque); void (*gfx_update)(void *opaque); + void (*gfx_update_notify)(void *opaque, QEMUBH *notify); void (*text_update)(void *opaque, console_ch_t *text); void (*update_interval)(void *opaque, uint64_t interval); } GraphicHwOps; @@ -282,6 +283,7 @@ QemuConsole *graphic_console_init(DeviceState *dev, void *opaque); void graphic_hw_update(QemuConsole *con); +void graphic_hw_update_notify(QemuConsole *con, QEMUBH *notify); void graphic_hw_invalidate(QemuConsole *con); void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata); diff --git a/ui/console.c b/ui/console.c index 07d4d63..020805c 100644 --- a/ui/console.c +++ b/ui/console.c @@ -255,6 +255,21 @@ void graphic_hw_update(QemuConsole *con) } } +void graphic_hw_update_notify(QemuConsole *con, QEMUBH *notify) +{ + assert(con != NULL); + + if (con->hw_ops->gfx_update_notify) { + con->hw_ops->gfx_update_notify(con->hw, notify); + return; + } + + if (con->hw_ops->gfx_update) { + con->hw_ops->gfx_update(con->hw); + } + qemu_bh_schedule(notify); +} + void graphic_hw_invalidate(QemuConsole *con) { if (!con) {
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- include/ui/console.h | 2 ++ ui/console.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)