qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: qemu-devel@nongnu.orgqemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2][RESEND] tc6393xb: add support for invalidate display callback
Date: Fri,  4 Mar 2011 03:48:02 +0300	[thread overview]
Message-ID: <1299199682-22041-2-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1299199682-22041-1-git-send-email-dbaryshkov@gmail.com>

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 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

  reply	other threads:[~2011-03-04  0:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04  0:48 [Qemu-devel] [PATCH 1/2][RESEND] vl: initialize all displaystates Dmitry Eremin-Solenikov
2011-03-04  0:48 ` Dmitry Eremin-Solenikov [this message]
2011-03-10  4:43 ` andrzej zaborowski
2011-03-10  8:18   ` Dmitry Eremin-Solenikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299199682-22041-2-git-send-email-dbaryshkov@gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=qemu-devel@nongnu.orgqemu-devel \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).