qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] sparc emulation tcx_update_display fix
@ 2006-08-02 20:48 Igor Kovalenko
  2006-08-02 22:08 ` [Qemu-devel] Fwd: " Igor Kovalenko
  2006-08-10 15:10 ` [Qemu-devel] Solaris-10 and qemu-0.8.2? Ishwar Rattan
  0 siblings, 2 replies; 6+ messages in thread
From: Igor Kovalenko @ 2006-08-02 20:48 UTC (permalink / raw)
  To: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 224 bytes --]

Hi!

Noticed that integer promotion precludes tcx display emulator from resetting
VGA_DIRTY_FLAG on pages it scanned, patch attached.
Before this change, ~75% host cpu is busy with drawing display lines, now it
is ~1% only.

[-- Attachment #1.2: Type: text/html, Size: 242 bytes --]

[-- Attachment #2: sparc-tcx-reset-vga-dirty.patch --]
[-- Type: text/x-patch, Size: 1072 bytes --]

Index: hw/tcx.c
===================================================================
RCS file: /cvsroot/qemu/qemu/hw/tcx.c,v
retrieving revision 1.7
diff -u -r1.7 tcx.c
--- hw/tcx.c	9 Apr 2006 01:06:34 -0000	1.7
+++ hw/tcx.c	2 Aug 2006 20:36:04 -0000
@@ -86,8 +86,8 @@
 static void tcx_update_display(void *opaque)
 {
     TCXState *ts = opaque;
-    uint32_t page;
-    int y, page_min, page_max, y_start, dd, ds;
+    unsigned long page, page_min, page_max;
+    int y, y_start, dd, ds;
     uint8_t *d, *s;
     void (*f)(TCXState *s1, uint8_t *d, const uint8_t *s, int width);
 
@@ -96,7 +96,7 @@
     page = ts->vram_offset;
     y_start = -1;
     page_min = 0x7fffffff;
-    page_max = -1;
+    page_max = 0;
     d = ts->ds->data;
     s = ts->vram;
     dd = ts->ds->linesize;
@@ -154,7 +154,7 @@
 		   ts->width, y - y_start);
     }
     /* reset modified pages */
-    if (page_max != -1) {
+    if (page_max > 0) {
         cpu_physical_memory_reset_dirty(page_min, page_max + TARGET_PAGE_SIZE,
                                         VGA_DIRTY_FLAG);
     }

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-10 18:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-02 20:48 [Qemu-devel] sparc emulation tcx_update_display fix Igor Kovalenko
2006-08-02 22:08 ` [Qemu-devel] Fwd: " Igor Kovalenko
2006-08-03  0:36   ` Jonathan Kalbfeld
2006-08-10 15:10 ` [Qemu-devel] Solaris-10 and qemu-0.8.2? Ishwar Rattan
2006-08-10 15:27   ` Ishwar Rattan
2006-08-10 18:18     ` Jonathan Kalbfeld

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).