From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35134 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvJBk-0000Ol-9z for qemu-devel@nongnu.org; Thu, 03 Mar 2011 19:48:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvJBj-0001vS-2q for qemu-devel@nongnu.org; Thu, 03 Mar 2011 19:48:12 -0500 Received: from mail-fx0-f45.google.com ([209.85.161.45]:40006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvJBi-0001v2-T0 for qemu-devel@nongnu.org; Thu, 03 Mar 2011 19:48:11 -0500 Received: by fxm11 with SMTP id 11so1833412fxm.4 for ; Thu, 03 Mar 2011 16:48:09 -0800 (PST) From: Dmitry Eremin-Solenikov Date: Fri, 4 Mar 2011 03:48:02 +0300 Message-Id: <1299199682-22041-2-git-send-email-dbaryshkov@gmail.com> In-Reply-To: <1299199682-22041-1-git-send-email-dbaryshkov@gmail.com> References: <1299199682-22041-1-git-send-email-dbaryshkov@gmail.com> Subject: [Qemu-devel] [PATCH 2/2][RESEND] tc6393xb: add support for invalidate display callback List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.orgqemu-devel@nongnu.org Signed-off-by: Dmitry Eremin-Solenikov --- hw/tc6393xb.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/tc6393xb.c b/hw/tc6393xb.c index ed49e94..14847a9 100644 --- a/hw/tc6393xb.c +++ b/hw/tc6393xb.c @@ -126,7 +126,8 @@ struct TC6393xbState { uint32_t scr_width, scr_height; /* in pixels */ qemu_irq l3v; unsigned blank : 1, - blanked : 1; + blanked : 1, + invalidated : 1; }; qemu_irq *tc6393xb_gpio_in_get(TC6393xbState *s) @@ -483,7 +484,9 @@ static void tc6393xb_update_display(void *opaque) s->blanked = s->blank; full_update = 1; } - if (s->scr_width != ds_get_width(s->ds) || s->scr_height != ds_get_height(s->ds)) { + if (s->scr_width != ds_get_width(s->ds) || + s->scr_height != ds_get_height(s->ds) || + s->invalidated) { qemu_console_resize(s->ds, s->scr_width, s->scr_height); full_update = 1; } @@ -491,6 +494,14 @@ static void tc6393xb_update_display(void *opaque) tc6393xb_draw_blank(s, full_update); else tc6393xb_draw_graphic(s, full_update); + + s->invalidated = 0; +} + +static void tc6393xb_invalidate_display(void *opaque) +{ + TC6393xbState *s = opaque; + s->invalidated = 1; } @@ -598,7 +609,7 @@ TC6393xbState *tc6393xb_init(uint32_t base, qemu_irq irq) s->scr_width = 480; s->scr_height = 640; s->ds = graphic_console_init(tc6393xb_update_display, - NULL, /* invalidate */ + tc6393xb_invalidate_display, /* invalidate */ NULL, /* screen_dump */ NULL, /* text_update */ s); -- 1.7.2.3