|
From: | Gerd Hoffmann |
Subject: | [Qemu-devel] Re: [PATCH] update server bits on vnc_update |
Date: | Tue, 21 Jul 2009 10:09:05 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
On 07/18/09 06:47, Glauber Costa wrote:
Since the server/guest split in vnc architecture, we no longer update the server bits on large updates. Result is screen gets garbled, specially on scroll actions. I must admit I don't fully understand our vnc code, but after a careful reading, it seemed to me the proposed patch would fix it, and it indeed, works.
NAK. VNC screen update workflow is this: (1) vnc_update() is called to mark a region as dirty, the guest bitmap is updated accordingly. May happen multiple times. (2) vnc_update_client() is called by timer. It walks the guest bitmap. For dirty regions it checks whenever guest and server bitmap are *really* different, if so it does a guest->server copy and updates the server dirty bitmap. (3) vnc_update_client() walks the server dirty map and sends over the changes to the client. Your patch kills the optimization in (2) and papers over the real bug.Some extra care is needed in vnc_dpy_copy() which can send a bitblit command to the guest (VNC_ENCODING_COPYRECT).
And while looking at the code I think I've spotted the actual bug: When sending a bitblit to the client we do *not* update the local server surface. Result is the vnc clients and the vnc servers idea of the screen content are not in sync any more. Which in turn will break the optimization in (2) and can easily result in a corrupted screen ...
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |