[Spice-devel] [PATCH 17/17] Protect palette cache agains concurrent access

2010-09-14 Thread alexl
From: Alexander Larsson --- display/qxldd.h |1 + display/res.c | 14 ++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/display/qxldd.h b/display/qxldd.h index 28df205..876fc11 100644 --- a/display/qxldd.h +++ b/display/qxldd.h @@ -185,6 +185,7 @@ typedef str

[Spice-devel] [PATCH 16/17] Protect cursor cache against concurrent access

2010-09-14 Thread alexl
From: Alexander Larsson --- display/qxldd.h |1 + display/res.c | 18 +- 2 files changed, 18 insertions(+), 1 deletions(-) diff --git a/display/qxldd.h b/display/qxldd.h index be9da7b..28df205 100644 --- a/display/qxldd.h +++ b/display/qxldd.h @@ -184,6 +184,7 @@ typedef

[Spice-devel] [PATCH 15/17] Protect image cache from concurrent access

2010-09-14 Thread alexl
From: Alexander Larsson --- display/qxldd.h |1 + display/res.c | 54 -- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/display/qxldd.h b/display/qxldd.h index fb39b46..be9da7b 100644 --- a/display/qxldd.h +++ b/displa

[Spice-devel] [PATCH 14/17] Fix typos Chach -> Cache

2010-09-14 Thread alexl
From: Alexander Larsson --- display/res.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/display/res.c b/display/res.c index 18b2033..1785f02 100644 --- a/display/res.c +++ b/display/res.c @@ -1905,7 +1905,7 @@ static _inline UINT32 GetFormatLineSize(INT32 wi

[Spice-devel] [PATCH 13/17] Prepend QXL to public function CheckIfCacheImage

2010-09-14 Thread alexl
From: Alexander Larsson --- display/res.c |2 +- display/res.h |2 +- display/rop.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/display/res.c b/display/res.c index fee2ae5..18b2033 100644 --- a/display/res.c +++ b/display/res.c @@ -1935,7 +1935,7 @@ static _

[Spice-devel] [PATCH 12/17] Make internal functions static

2010-09-14 Thread alexl
From: Alexander Larsson --- display/res.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/display/res.c b/display/res.c index 9d244a6..fee2ae5 100644 --- a/display/res.c +++ b/display/res.c @@ -1298,7 +1298,7 @@ typedef struct InternalImage { #define IMAGE_KEY_HASH

[Spice-devel] [PATCH 11/17] Add semaphore to protect quic_data from concurrent access

2010-09-14 Thread alexl
From: Alexander Larsson --- display/qxldd.h |1 + display/res.c | 12 +++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/display/qxldd.h b/display/qxldd.h index b55ad30..fb39b46 100644 --- a/display/qxldd.h +++ b/display/qxldd.h @@ -249,6 +249,7 @@ typedef struc

[Spice-devel] [PATCH 10/17] Remove unused structure member

2010-09-14 Thread alexl
From: Alexander Larsson --- display/qxldd.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/display/qxldd.h b/display/qxldd.h index 7f254f8..b55ad30 100644 --- a/display/qxldd.h +++ b/display/qxldd.h @@ -315,8 +315,6 @@ typedef struct PDev { UINT32 n_surfaces;

[Spice-devel] [PATCH 09/17] Save FPU on stack, not in pdev

2010-09-14 Thread alexl
From: Alexander Larsson We can't use the global pdev FPUSave, because multiple processes could be calling the sse2 using code in parallel. --- display/qxldd.h |2 -- display/res.c | 31 +-- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/displ

[Spice-devel] [PATCH 08/17] Add protection for cursor_ring

2010-09-14 Thread alexl
From: Alexander Larsson --- display/qxldd.h |1 + display/res.c | 11 +++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/display/qxldd.h b/display/qxldd.h index 8c5516d..f09814f 100644 --- a/display/qxldd.h +++ b/display/qxldd.h @@ -181,6 +181,7 @@ typedef struct

[Spice-devel] [PATCH 07/17] Fixed up cmd_sem use

2010-09-14 Thread alexl
From: Alexander Larsson --- display/res.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/display/res.c b/display/res.c index faf3b9c..9f8c288 100644 --- a/display/res.c +++ b/display/res.c @@ -584,13 +584,13 @@ void PushDrawable(PDev *pdev, QXLDrawable *drawa

[Spice-devel] [PATCH 06/17] Only look for streams on primary surface

2010-09-14 Thread alexl
From: Alexander Larsson We currently only support streams there anyway, and the code doesn't work for offscreen surfaces as is since its only looking at the destination rect. --- display/rop.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/display/rop.c b/displ

[Spice-devel] [PATCH 05/17] Protect surface id allocation with semaphore

2010-09-14 Thread alexl
From: Alexander Larsson --- display/qxldd.h |1 + display/res.c | 14 +++--- display/surface.h | 19 +++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/display/qxldd.h b/display/qxldd.h index ad373ae..8c5516d 100644 --- a/display/qxldd.h +++

[Spice-devel] [PATCH 04/17] Protect all references to cmd_ring with cmd_sem

2010-09-14 Thread alexl
From: Alexander Larsson --- display/res.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/display/res.c b/display/res.c index 807f94a..c1d0cb5 100644 --- a/display/res.c +++ b/display/res.c @@ -74,12 +74,10 @@ static BOOL SetClip(PDev *pdev, CLIPOBJ *clip, QXLDra

[Spice-devel] [PATCH 03/17] Move cmd_sem and print_sem to global device info

2010-09-14 Thread alexl
From: Alexander Larsson The cmd and print semaphores protect hardware instances that exist one per device, so we can't really use per-pdev locks to protect them. --- display/driver.c | 22 +++--- display/qxldd.h |6 +++--- display/res.c| 20 ++-- 3 fi

[Spice-devel] [PATCH 02/17] Drop DevResDynamic

2010-09-14 Thread alexl
From: Alexander Larsson Now that all DevRes are dynamic we can just put the data in DevRes. --- display/qxldd.h | 12 display/res.c | 49 - 2 files changed, 24 insertions(+), 37 deletions(-) diff --git a/display/qxldd.h b/displa

[Spice-devel] [PATCH 01/17] Make global_res be an array of pointers and Res a pointer

2010-09-14 Thread alexl
From: Alexander Larsson Instead of allocating an array of DevRes we allocate each DevRes dynamically for each element. Also make PDEV->Res be a pointer instead of copying the global pdev. This also drops the needto Sync it when the pdev is made inactive, as all pdevs share the same DevRes. This

[Spice-devel] [PATCH 00/17] Win32 driver thread safety

2010-09-14 Thread alexl
From: Alexander Larsson With the addition of offscreen surfaces we get concurrency in the driver. The msdn page for EngAssociateSurface says: By default, when a driver supports device bitmaps by implementing DrvCreateDeviceBitmap/DrvDeleteDeviceBitmap, GDI does not automatically synchronize draw

Re: [Spice-devel] [PATCH xf86-video-qxl 2/2] Fix allocating a too large fb

2010-09-14 Thread Alon Levy
- "Hans de Goede" wrote: > We were allocating a fb of max-width * max-width pixels rather then > max-height * max-width pixels, this patch fixes this. > --- > src/qxl_driver.c |5 - > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/src/qxl_driver.c b/src/qxl_drive

Re: [Spice-devel] [PATCH] smartcard: add channel

2010-09-14 Thread Alon Levy
- "Gerd Hoffmann" wrote: > Hi, > > > +enum { > > +SPICE_MSG_SMARTCARD_DATA = 1, > > + > > +SPICE_MSG_END_SMARTCARD > > +}; > > + > > +enum { > > +SPICE_MSGC_SMARTCARD_DATA = 1, > > + > > +SPICE_MSGC_END_SMARTCARD > > +}; > > I don't think this is a good idea. This is just

Re: [Spice-devel] [PATCH] smartcard: add channel

2010-09-14 Thread Alon Levy
- "Alexander Larsson" wrote: > On Mon, 2010-09-13 at 13:58 -0400, Alon Levy wrote: > > --- > > spice/enums.h | 13 + > > 1 files changed, 13 insertions(+), 0 deletions(-) > > > > diff --git a/spice/enums.h b/spice/enums.h > > Is this change generated? If not, just update the

Re: [Spice-devel] Memory Leak on spicec

2010-09-14 Thread Alex Peter
I referred "Target is the one running the spicec client" Alex. - Original Message - From: Alexander Larsson Sent: 09/14/10 07:07 PM To: Alex Peter Subject: Re: [Spice-devel] Memory Leak on spicec On Tue, 2010-09-14 at 04:13 +0200, Alex Peter wrote: > Dear All, > > > I have crossed comp

Re: [Spice-devel] [PATCH xf86-video-qxl 1/2] Change default virtual size to 1920x1080

2010-09-14 Thread Gerd Hoffmann
On 09/14/10 12:05, Alexander Larsson wrote: On Mon, 2010-09-13 at 22:14 +0200, Hans de Goede wrote: This change does come at the prize of using 5MB more memory, but that seems like a reasonable price to pay to give us parity wrt supported resolutions with the windows driver. Also this is a must

[Spice-devel] [PATCH] qxl licence: add WDK clarification

2010-09-14 Thread Gerd Hoffmann
Hi, This patch updates the licence text of the windows qxl driver. It adds a paragraph clarifying that the WDK Code qualifies for the system library exception in the GPL. This follows the licensing model the virtio windows drivers are using. http://git.kernel.org/?p=virt/kvm/kvm-guest-drivers

Re: [Spice-devel] [PATCH 3/3] fix palette handling for 0.4 compat

2010-09-14 Thread Alexander Larsson
On Tue, 2010-09-14 at 10:45 +0200, Gerd Hoffmann wrote: > spice 0.4 guests pass 16bpp palette colors when running in > a 16bpp video mode. Convert them to 32bpp. > > Signed-off-by: Gerd Hoffmann > --- ack -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexande

Re: [Spice-devel] [PATCH 2/3] fix brush handling for 0.4 compat

2010-09-14 Thread Alexander Larsson
On Tue, 2010-09-14 at 10:45 +0200, Gerd Hoffmann wrote: > spice 0.4 guests pass 16bpp colors for brushes when running in > a 16bpp video mode. Convert them to 32bpp. > > Signed-off-by: Gerd Hoffmann > --- ack -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alex

Re: [Spice-devel] [PATCH 1/3] move command flags handling to the qxl parser

2010-09-14 Thread Alexander Larsson
On Tue, 2010-09-14 at 10:45 +0200, Gerd Hoffmann wrote: > Pass through command flags to the qxl parser, so we can hide all > compat bits for spice 0.4 within the qxl parser. ack -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexander Larsson

Re: [Spice-devel] [PATCH] smartcard: add channel

2010-09-14 Thread Alexander Larsson
On Mon, 2010-09-13 at 13:58 -0400, Alon Levy wrote: > --- > spice/enums.h | 13 + > 1 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/spice/enums.h b/spice/enums.h Is this change generated? If not, just update the spice.proto and run ./spice_codegen.py -e spice.p

Re: [Spice-devel] [PATCH] add compat flag for 16bpp mode

2010-09-14 Thread Alexander Larsson
On Tue, 2010-09-14 at 10:12 +0200, Gerd Hoffmann wrote: > spice 0.6 uses 32bpp values unconditionally for brush and palette > colors. > > spice 0.4 used to use 16 bpp or 32 bpp depending on the video mode. > The qxl parser needs to know the guest video mode depth to correctly > interpret these val

Re: [Spice-devel] Memory Leak on spicec

2010-09-14 Thread Alexander Larsson
On Tue, 2010-09-14 at 04:13 +0200, Alex Peter wrote: > Dear All, > > > I have crossed compiled spice client for target platform > (spicec, 0.6.0 version) and server & qemu (git version) on x86_64 > system. > > XP SP3 was installed under qemulator. both server and client are in > same

Re: [Spice-devel] [PATCH xf86-video-qxl 1/2] Change default virtual size to 1920x1080

2010-09-14 Thread Alexander Larsson
On Mon, 2010-09-13 at 22:14 +0200, Hans de Goede wrote: > With the old default virtual size of 1024x768, using higher resolutions > is not possible without an xorg.conf. Since the default now a days is > to not have an xorg.conf, this is sort of unfortunate. > > This patch makes these higher resol

[Spice-devel] [PATCH 2/3] fix brush handling for 0.4 compat

2010-09-14 Thread Gerd Hoffmann
spice 0.4 guests pass 16bpp colors for brushes when running in a 16bpp video mode. Convert them to 32bpp. Signed-off-by: Gerd Hoffmann --- server/red_parse_qxl.c | 61 +-- 1 files changed, 38 insertions(+), 23 deletions(-) diff --git a/server/red_p

[Spice-devel] [PATCH 3/3] fix palette handling for 0.4 compat

2010-09-14 Thread Gerd Hoffmann
spice 0.4 guests pass 16bpp palette colors when running in a 16bpp video mode. Convert them to 32bpp. Signed-off-by: Gerd Hoffmann --- server/red_parse_qxl.c | 99 +++- 1 files changed, 56 insertions(+), 43 deletions(-) diff --git a/server/red_pars

[Spice-devel] [PATCH 1/3] move command flags handling to the qxl parser

2010-09-14 Thread Gerd Hoffmann
Pass through command flags to the qxl parser, so we can hide all compat bits for spice 0.4 within the qxl parser. Signed-off-by: Gerd Hoffmann --- server/red_parse_qxl.c | 18 ++ server/red_parse_qxl.h |4 +--- server/red_worker.c| 10 +++--- 3 files changed, 18 i

Re: [Spice-devel] [PATCH] smartcard: add channel

2010-09-14 Thread Gerd Hoffmann
Hi, +enum { +SPICE_MSG_SMARTCARD_DATA = 1, + +SPICE_MSG_END_SMARTCARD +}; + +enum { +SPICE_MSGC_SMARTCARD_DATA = 1, + +SPICE_MSGC_END_SMARTCARD +}; I don't think this is a good idea. This is just a chardev passthrough, right? If so, then we should just make it that. Name

[Spice-devel] [PATCH] add compat flag for 16bpp mode

2010-09-14 Thread Gerd Hoffmann
spice 0.6 uses 32bpp values unconditionally for brush and palette colors. spice 0.4 used to use 16 bpp or 32 bpp depending on the video mode. The qxl parser needs to know the guest video mode depth to correctly interpret these values in spice 0.4 compat mode. Add a flag to pass on this informarti

Re: [Spice-devel] [PATCH xf86-video-qxl] Make non default qxl modes available

2010-09-14 Thread Gerd Hoffmann
+/* Modelines for modes which are known by the qxl device, but are not in the + server default mode table (DMTModes). Idea copied from the vmware xorg + driver (which is also MIT licensed), the modes were generated using gtf. */ +#define MODEPREFIX NULL, NULL, NULL, 0, M_T_DRIVER +#define MODE