Re: [Spice-devel] [RFC 1/2] spice, server: introduce SpiceCharDevice

2010-08-25 Thread Alon Levy
- "Alexander Larsson" wrote: > On Wed, 2010-08-25 at 06:53 -0400, Alon Levy wrote: > > index aede4ce..6c02afb 100644 > > --- a/server/spice-experimental.h > > +++ b/server/spice-experimental.h > > @@ -1,26 +1,31 @@ > > -/* vdi port interface */ > > +/* char device interfaces */ > > > > -#d

Re: [Spice-devel] [PATCH 0/1] Fix 16bpp lz encoded images

2010-08-25 Thread Alon Levy
- al...@redhat.com wrote: > From: Alexander Larsson > > We were using the wrong stride for 16bpp lz_encoded images, fix > is to look at the type to get the right stride when allocating > the lz surfaces to decode into. > > Alexander Larsson (1): > server: Fix alloc_lz_image_surface strid

Re: [Spice-devel] [RFC 1/2] spice, server: introduce SpiceCharDevice

2010-08-25 Thread Alon Levy
Hi, - "Gerd Hoffmann" wrote: > Hi, > > > -__visible__ void spice_server_vdi_port_wakeup(SpiceVDIPortInstance > *sin) > > +__visible__ void > spice_server_vdi_port_wakeup(SpiceCharDeviceInstance *sin) > > This should be renamed too. Also please make a separate patch which > does the pure

[Spice-devel] [PATCH 1/1] server: Fix alloc_lz_image_surface stride allocations

2010-08-25 Thread alexl
From: Alexander Larsson All lz surfaces are not 4 bytes per pixel, calculate the right stride based on the pixman format. --- common/canvas_utils.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/canvas_utils.c b/common/canvas_utils.c index 1f6eca6..020b23c 10064

[Spice-devel] [PATCH 0/1] Fix 16bpp lz encoded images

2010-08-25 Thread alexl
From: Alexander Larsson We were using the wrong stride for 16bpp lz_encoded images, fix is to look at the type to get the right stride when allocating the lz surfaces to decode into. Alexander Larsson (1): server: Fix alloc_lz_image_surface stride allocations common/canvas_utils.c |2 +-

Re: [Spice-devel] [RFC 1/2] spice, server: introduce SpiceCharDevice

2010-08-25 Thread Gerd Hoffmann
Hi, -__visible__ void spice_server_vdi_port_wakeup(SpiceVDIPortInstance *sin) +__visible__ void spice_server_vdi_port_wakeup(SpiceCharDeviceInstance *sin) This should be renamed too. Also please make a separate patch which does the pure vdiport -> chardevice renaming. +__visible__ int s

Re: [Spice-devel] Fwd: [PATCH 2/3] server: fix race when data arrives from guest through vdi interface

2010-08-25 Thread Alon Levy
- "Alexander Larsson" wrote: > On Wed, 2010-08-25 at 06:28 -0400, Alon Levy wrote: > > - Forwarded Message - > > From: "Alon Levy" > > To: al...@redhat.com > > Sent: Sunday, August 22, 2010 10:28:37 PM (GMT+0200) Auto-Detected > > Subject: [PATCH 2/3] server: fix race when data arri

Re: [Spice-devel] [RFC 1/2] spice, server: introduce SpiceCharDevice

2010-08-25 Thread Alexander Larsson
On Wed, 2010-08-25 at 06:53 -0400, Alon Levy wrote: > index aede4ce..6c02afb 100644 > --- a/server/spice-experimental.h > +++ b/server/spice-experimental.h > @@ -1,26 +1,31 @@ > -/* vdi port interface */ > +/* char device interfaces */ > > -#define SPICE_INTERFACE_VDI_PORT "vdi_port" > -#define S

Re: [Spice-devel] Fwd: [PATCH 2/3] server: fix race when data arrives from guest through vdi interface

2010-08-25 Thread Alexander Larsson
On Wed, 2010-08-25 at 06:28 -0400, Alon Levy wrote: > - Forwarded Message - > From: "Alon Levy" > To: al...@redhat.com > Sent: Sunday, August 22, 2010 10:28:37 PM (GMT+0200) Auto-Detected > Subject: [PATCH 2/3] server: fix race when data arrives from guest through > vdi interface > > The

Re: [Spice-devel] Fwd: [PATCH 1/3] server: bugfix - make vdi_port_write_retry reiterate if write_queue still not empty

2010-08-25 Thread Alexander Larsson
On Wed, 2010-08-25 at 06:27 -0400, Alon Levy wrote: > - Forwarded Message - > From: "Alon Levy" > To: al...@redhat.com > Sent: Sunday, August 22, 2010 10:28:36 PM (GMT+0200) Auto-Detected > Subject: [PATCH 1/3] server: bugfix - make vdi_port_write_retry reiterate if > write_queue still no

Re: [Spice-devel] [PATCH 1/1] server: Add missing break in switch case

2010-08-25 Thread Alon Levy
- al...@redhat.com wrote: > From: Alexander Larsson > > --- > server/red_worker.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/server/red_worker.c b/server/red_worker.c > index 2ce15f5..043aa36 100644 > --- a/server/red_worker.c > +++ b/server/red_worker.c

Re: [Spice-devel] [PATCH] server: clean glz drawables when reseting qxl

2010-08-25 Thread Alexander Larsson
On Wed, 2010-08-25 at 10:06 +0300, Yonit Halperin wrote: > When the we reset qxl, we destroy all srufaces. Since surfaces and glz > drawables are no longer dependent, we need to call > red_display_clear_glz_drawables explicitly > in order to clear all our drawables references in the server. > ---

[Spice-devel] [PATCH 1/1] server: Add missing break in switch case

2010-08-25 Thread alexl
From: Alexander Larsson --- server/red_worker.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 2ce15f5..043aa36 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -5212,6 +5212,7 @@ static BitmapGradualType _ge

[Spice-devel] [PATCH 0/1] Fix crash in _get_bitmap_graduality_level

2010-08-25 Thread alexl
From: Alexander Larsson There is a break missing that caused a crash in the 16bpp case. Alexander Larsson (1): server: Add missing break in switch case server/red_worker.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- 1.7.2.1 ___

[Spice-devel] [RFC 2/2] qemu, spice-vmc, vdi: update to use SpiceCharDevice* instead of SpiceVDIPort*

2010-08-25 Thread Alon Levy
--- hw/spice-vdi.c | 22 ++ hw/spice-vmc.c | 39 --- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/hw/spice-vdi.c b/hw/spice-vdi.c index 23cbbe1..b2ea54a 100644 --- a/hw/spice-vdi.c +++ b/hw/spice-vdi.c @@ -104,7 +104,

[Spice-devel] [RFC 1/2] spice, server: introduce SpiceCharDevice

2010-08-25 Thread Alon Levy
SpiceCharDevice{Interface,Instance} replaces SpiceVDIPort*. This gives nothing right now, but lets us support smartcard and other interfaces that rely on a char device without having to introduce further patches to qemu. The changes are: * spice_server_add_interface delegates to spice_server_cha

[Spice-devel] Fwd: [PATCH 3/3] server: retry mouse send on queue full - required after previous race fix

2010-08-25 Thread Alon Levy
- Forwarded Message - From: "Alon Levy" To: al...@redhat.com Sent: Sunday, August 22, 2010 10:21:02 PM (GMT+0200) Auto-Detected Subject: [PATCH 3/3] server: retry mouse send on queue full - required after previous race fix --- server/reds.c |1 + 1 files changed, 1 insertions(+), 0

[Spice-devel] Fwd: [PATCH 2/3] server: fix race when data arrives from guest through vdi interface

2010-08-25 Thread Alon Levy
- Forwarded Message - From: "Alon Levy" To: al...@redhat.com Sent: Sunday, August 22, 2010 10:28:37 PM (GMT+0200) Auto-Detected Subject: [PATCH 2/3] server: fix race when data arrives from guest through vdi interface The call chains that could lead to write_to_vdi_port from two threads:

[Spice-devel] Fwd: [PATCH 1/3] server: bugfix - make vdi_port_write_retry reiterate if write_queue still not empty

2010-08-25 Thread Alon Levy
- Forwarded Message - From: "Alon Levy" To: al...@redhat.com Sent: Sunday, August 22, 2010 10:28:36 PM (GMT+0200) Auto-Detected Subject: [PATCH 1/3] server: bugfix - make vdi_port_write_retry reiterate if write_queue still not empty The vdi_port_write_timer_started flag was not being re

[Spice-devel] Fwd: [PATCH 0/3] spice server vdi_port interface fixes

2010-08-25 Thread Alon Levy
It seems I never actually sent this to the list. Three single line patches with incredibly detailed explanation. - Forwarded Message - From: "Alon Levy" To: al...@redhat.com Sent: Sunday, August 22, 2010 10:28:35 PM (GMT+0200) Auto-Detected Subject: [PATCH 0/3] spice server vdi_port inter

Re: [Spice-devel] [PATCH 0/2] Better xshm handling in client

2010-08-25 Thread Gerd Hoffmann
On 08/23/10 17:14, al...@redhat.com wrote: From: Alexander Larsson With this we no longer continue to try using xsh if we get some form of error that is likely to be permanent. Also, we stop leaking xshm segments. Alexander Larsson (2): Don't try xshm any more if it fails for a permanent rea

Re: [Spice-devel] [PATCH 1/1] client: Handle async errors from xshm setup

2010-08-25 Thread Gerd Hoffmann
On 08/25/10 12:19, al...@redhat.com wrote: From: Alexander Larsson XShmAttach can fail asynchronously, so we need to check the errors in the x error handler during the XSync. --- client/x11/platform.cpp | 28 1 files changed, 28 insertions(+), 0 deletions(-) di

[Spice-devel] [PATCH 1/1] client: Handle async errors from xshm setup

2010-08-25 Thread alexl
From: Alexander Larsson XShmAttach can fail asynchronously, so we need to check the errors in the x error handler during the XSync. --- client/x11/platform.cpp | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/client/x11/platform.cpp b/client/x1

[Spice-devel] [PATCH 0/1] More Xshm fixes

2010-08-25 Thread alexl
From: Alexander Larsson Gerd pointed out that we need to also handle async errors from XShmAttach, so we also need this fix. Alexander Larsson (1): client: Handle async errors from xshm setup client/x11/platform.cpp | 28 1 files changed, 28 insertions(+), 0 de

Re: [Spice-devel] [PATCH] vdservice: don't start when no qxl device present

2010-08-25 Thread Gerd Hoffmann
Hi, There is a general requirement that when a guest is running without spice we "don't interfere". For instance it is run with a regular vga device and rdp is used for vdi. Also, before this patch we just sit there and do nothing because vdagent already has logic such as this patch contains a

[Spice-devel] [PATCH 2/2] Detect played silence and stop audio stream after 1 second

2010-08-25 Thread alexl
From: Alexander Larsson VLC sends silence when paused (bug #28817), which causes a lot of unnecessary network traffic. We detect such silence and shut down the clients audio stream (even though the audio is still active in the server), re-enabling it when we get non-silent data again. --- server

[Spice-devel] [PATCH 1/2] server: Don't send stream frames that are identical to the last one

2010-08-25 Thread alexl
From: Alexander Larsson This happens e.g. with the vlc player when paused, as it still draws a continuous stream of frames (bug #28817). It may also help slightly if a video contains identical frames in a row for other reasons. We detect frame equality using the adler32 checksum. There is a smal

[Spice-devel] [PATCH 0/2] Fix #28817 - vlc sends data when paused

2010-08-25 Thread alexl
From: Alexander Larsson VLC sends silent audio and repeats the same frame continuosly while paused. This is fixed by silence detection and same-frame detection. Alexander Larsson (2): server: Don't send stream frames that are identical to the last one Detect played silence and stop audio str

Re: [Spice-devel] [PATCH] spice-vmc: add a reset handler used to unregister spice interface (and trigger server mouse)

2010-08-25 Thread Gerd Hoffmann
Hi, static int vmc_initfn(VirtIOSerialDevice *dev) { VirtIOSerialPort *port = DO_UPCAST(VirtIOSerialPort, dev,&dev->qdev); @@ -185,6 +193,7 @@ static int vmc_initfn(VirtIOSerialDevice *dev) svc->vmstate = qemu_add_vm_change_state_handler( vmc_change_state_handler, svc

[Spice-devel] [PATCH] server: clean glz drawables when reseting qxl

2010-08-25 Thread Yonit Halperin
When the we reset qxl, we destroy all srufaces. Since surfaces and glz drawables are no longer dependent, we need to call red_display_clear_glz_drawables explicitly in order to clear all our drawables references in the server. --- server/red_worker.c |3 +++ 1 files changed, 3 insertions(+),