[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2][RESEND] tc6393xb: add support for invalidate di
From: |
Dmitry Eremin-Solenikov |
Subject: |
[Qemu-devel] [PATCH 2/2][RESEND] tc6393xb: add support for invalidate display callback |
Date: |
Fri, 4 Mar 2011 03:48:02 +0300 |
Signed-off-by: Dmitry Eremin-Solenikov <address@hidden>
---
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