qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Igor Kovalenko" <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Fwd: sparc emulation tcx_update_display fix
Date: Thu, 3 Aug 2006 02:08:48 +0400	[thread overview]
Message-ID: <b2fa41d60608021508w20292b6tdbb5009fe0f311d9@mail.gmail.com> (raw)
In-Reply-To: <b2fa41d60608021348p2b7a2685we3164ff2b043d212@mail.gmail.com>


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

Resending, sorry if this is a duplicate

---------- Forwarded message ----------
From: Igor Kovalenko
Date: Aug 3, 2006 12:48 AM
Subject: sparc emulation tcx_update_display fix
To: qemu-devel@nongnu.org

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: 609 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);
     }

  reply	other threads:[~2006-08-02 22:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 20:48 [Qemu-devel] sparc emulation tcx_update_display fix Igor Kovalenko
2006-08-02 22:08 ` Igor Kovalenko [this message]
2006-08-03  0:36   ` [Qemu-devel] Fwd: " 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

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=b2fa41d60608021508w20292b6tdbb5009fe0f311d9@mail.gmail.com \
    --to=igor.v.kovalenko@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).