From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Alex Williamson <alex.williamson@hp.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] vnc linesize
Date: Thu, 20 Mar 2008 18:14:51 +0000 [thread overview]
Message-ID: <47E2A99B.5070700@eu.citrix.com> (raw)
In-Reply-To: <1206034265.27908.124.camel@bling>
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
Hi Alex,
I think I have found the bug that causes the strange behaviour you are
describing, but I have no way to be sure because I cannot test it on a
ia64 machine.
Could you please try the patch I am attaching (to be applied on top of
the other one)?
Best Regards,
Stefano Stabellini
Alex Williamson wrote:
> On Wed, 2008-03-19 at 17:24 +0000, Stefano Stabellini wrote:
>> Hi all,
>> the patch I am attaching enables buffer sharing for vnc when the
>> linesize != width * depth.
>
> Hi Stefano,
>
> I'm seeing some odd issues with this on ia64, see the attached
> screenshot. I'm using VNC, not SDL, and have specified opengl=0 in my
> domain config file. The left side of the screen is wrapped around
> overtop of the right side of the screen. The copy on the left side is
> not updated unless I change the resolution the guest is running or force
> the VNC client to manually refresh. Updates are normal on the copy on
> the right side of the screen. Any ideas? Thanks,
>
[-- Attachment #2: linesize2.patch --]
[-- Type: text/x-patch, Size: 1392 bytes --]
diff -r 491a3b62ae5b tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c Thu Mar 20 17:48:02 2008 +0000
+++ b/tools/ioemu/vnc.c Thu Mar 20 18:03:52 2008 +0000
@@ -370,16 +370,20 @@ static void vnc_dpy_resize(DisplayState
int o;
if (!ds->shared_buf) {
+ ds->linesize = w * vs->depth;
if (allocated)
- ds->data = realloc(ds->data, h * linesize);
+ ds->data = realloc(ds->data, h * ds->linesize);
else
- ds->data = malloc(h * linesize);
+ ds->data = malloc(h * ds->linesize);
allocated = 1;
- } else if (allocated) {
- free(ds->data);
- allocated = 0;
- }
- vs->old_data = realloc(vs->old_data, h * linesize);
+ } else {
+ ds->linesize = linesize;
+ if (allocated) {
+ free(ds->data);
+ allocated = 0;
+ }
+ }
+ vs->old_data = realloc(vs->old_data, h * ds->linesize);
vs->dirty_row = realloc(vs->dirty_row, h * sizeof(vs->dirty_row[0]));
vs->update_row = realloc(vs->update_row, h * sizeof(vs->dirty_row[0]));
@@ -396,7 +400,6 @@ static void vnc_dpy_resize(DisplayState
size_changed = ds->width != w || ds->height != h;
ds->width = w;
ds->height = h;
- ds->linesize = linesize;
if (vs->csock != -1 && vs->has_resize && size_changed) {
vs->width = ds->width;
vs->height = ds->height;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2008-03-20 18:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 17:24 [PATCH] vnc linesize Stefano Stabellini
2008-03-20 17:31 ` Alex Williamson
2008-03-20 18:06 ` Alex Williamson
2008-03-20 18:16 ` Keir Fraser
2008-03-20 18:14 ` Stefano Stabellini [this message]
2008-03-20 18:23 ` Alex Williamson
2008-03-20 18:26 ` Stefano Stabellini
2008-03-20 18:23 ` Keir Fraser
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=47E2A99B.5070700@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=alex.williamson@hp.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.