From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSRH7-00012w-Ad for qemu-devel@nongnu.org; Sun, 19 Jul 2009 03:57:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSRH4-00012F-12 for qemu-devel@nongnu.org; Sun, 19 Jul 2009 03:57:37 -0400 Received: from [199.232.76.173] (port=39354 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSRH3-00012B-Na for qemu-devel@nongnu.org; Sun, 19 Jul 2009 03:57:33 -0400 Received: from mx20.gnu.org ([199.232.41.8]:25530) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MSRH2-0002Sb-Vw for qemu-devel@nongnu.org; Sun, 19 Jul 2009 03:57:33 -0400 Received: from mail-vw0-f171.google.com ([209.85.212.171]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MSRH2-0001YE-37 for qemu-devel@nongnu.org; Sun, 19 Jul 2009 03:57:32 -0400 Received: by vwj1 with SMTP id 1so1586630vwj.4 for ; Sun, 19 Jul 2009 00:57:27 -0700 (PDT) MIME-Version: 1.0 Sender: lookkas@gmail.com In-Reply-To: <1247892434-21209-1-git-send-email-glommer@redhat.com> References: <1247892434-21209-1-git-send-email-glommer@redhat.com> Date: Sun, 19 Jul 2009 04:57:27 -0300 Message-ID: <6ac58f4f0907190057l680607f4v20e43e44a1c5365a@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] update server bits on vnc_update From: Lucas Meneghel Rodrigues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, Gerd Hoffmann On Sat, Jul 18, 2009 at 1:47 AM, 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. > > Gerd, Anthony, please tell me what you think of this approach. > > This fixes the following bugs for me: > https://bugzilla.redhat.com/show_bug.cgi?id=3D503156 > https://bugzilla.redhat.com/show_bug.cgi?id=3D507626 > https://bugs.launchpad.net/qemu/+bug/397212 Works for me as well. I've rebuilt the virt-preview repo rpms with Glauber's patch and I don't have garbled VNC anymore. Thanks for fixing this up, Glauber! > Signed-off-by: Glauber Costa > CC: Gerd Hoffmann > --- > =A0vnc.c | =A0 10 ++++++++-- > =A01 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/vnc.c b/vnc.c > index de0ff87..acebdaf 100644 > --- a/vnc.c > +++ b/vnc.c > @@ -262,9 +262,8 @@ static inline int vnc_and_bits(const uint32_t *d1, co= nst uint32_t *d2, > =A0 =A0 return 0; > =A0} > > -static void vnc_update(VncState *vs, int x, int y, int w, int h) > +static void do_vnc_update(struct VncSurface *s, int x, int y, int w, int= h) > =A0{ > - =A0 =A0struct VncSurface *s =3D &vs->guest; > =A0 =A0 int i; > > =A0 =A0 h +=3D y; > @@ -286,6 +285,13 @@ static void vnc_update(VncState *vs, int x, int y, i= nt w, int h) > =A0 =A0 =A0 =A0 =A0 =A0 vnc_set_bit(s->dirty[y], (x + i) / 16); > =A0} > > + > +static void vnc_update(VncState *vs, int x, int y, int w, int h) > +{ > + =A0 =A0do_vnc_update(&vs->guest, x, y, w, h); > + =A0 =A0do_vnc_update(&vs->server, x, y, w, h); > +} > + > =A0static void vnc_dpy_update(DisplayState *ds, int x, int y, int w, int = h) > =A0{ > =A0 =A0 VncDisplay *vd =3D ds->opaque; > -- > 1.6.2.2 > > > > --=20 Lucas Meneghel