From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH][VNC] Fix fragments due to incomplete dirty tracking in CGA mode
Date: Mon, 10 Dec 2007 11:51:39 -0600 [thread overview]
Message-ID: <475D7CAB.9070300@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
Dirty tracking is done in the VNC server by splitting the framebuffer
into 16-pixel blocks and then updating a bitmap when a dpy->update()
occurs. If dpy->update() is called with an x st (x % 16) != 0, then the
very last block dirtied by the update could potentially not be tracked.
This is really only visible when in CGA mode or when using the VMware
VGA driver since they are the only ones that generate updates where x !=
0. The attached patch addresses this.
Reproducing the fragments isn't 100% reliable but I was able to find a
somewhat reliable way to reproduce (holding in backspace when editting a
grub entry) and confirmed that this patch fixes the problem.
Regards,
Anthony Liguori
[-- Attachment #2: vnc-fragments.diff --]
[-- Type: text/x-patch, Size: 602 bytes --]
Index: qemu/vnc.c
===================================================================
--- qemu.orig/vnc.c 2007-12-10 11:39:04.000000000 -0600
+++ qemu/vnc.c 2007-12-10 11:42:57.000000000 -0600
@@ -258,6 +258,13 @@
h += y;
+ /* round x down to ensure the loop only spans one 16-pixel block per,
+ iteration. otherwise, if (x % 16) != 0, the last iteration may span
+ two 16-pixel blocks but we only mark the first as dirty
+ */
+ w += (x % 16);
+ x -= (x % 16);
+
for (; y < h; y++)
for (i = 0; i < w; i += 16)
vnc_set_bit(vs->dirty_row[y], (x + i) / 16);
reply other threads:[~2007-12-10 17:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=475D7CAB.9070300@us.ibm.com \
--to=aliguori@us.ibm.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).