Re: [Spice-devel] [PATCH 1/3] spicevmc: store channel in char device

2016-11-02 Thread Pavel Grunt
On Wed, 2016-11-02 at 16:25 -0500, Jonathon Jongsma wrote: > Store the channel in the char device object, and unref it in > dispose. > Previously, we were just creating a channel and potentially allowing > it > to leak.  There may be better long-term solutions, but this works > for > now. Acked-by:

Re: [Spice-devel] [vd_agent] udscs: Clarify the udscs_read_callback() documentation

2016-11-02 Thread Jonathon Jongsma
On Wed, 2016-11-02 at 16:36 +0100, Francois Gouget wrote: > Signed-off-by: Francois Gouget > --- >  src/udscs.h | 5 +++-- >  1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/udscs.h b/src/udscs.h > index e13750c..d65630d 100644 > --- a/src/udscs.h > +++ b/src/udscs.h > @@ -39,

[Spice-devel] [PATCH 2/3] char-device: add 'self' param to vfuncs

2016-11-02 Thread Jonathon Jongsma
Add a 'self' parameter to all of the char device virtual functions so that we don't have to play games with the 'opaque' pointer. --- server/char-device.c | 31 ++--- server/char-device.h | 20 server/reds.c | 23 ++ server/sma

[Spice-devel] [PATCH 0/3] Refactory patches (Nov 2)

2016-11-02 Thread Jonathon Jongsma
Some updated patches rebased on latest master Jonathon Jongsma (3): spicevmc: store channel in char device char-device: add 'self' param to vfuncs Smartcard: store channel in device server/char-device.c | 31 ++--- server/char-device.h | 20 +++--- server/re

[Spice-devel] [PATCH 1/3] spicevmc: store channel in char device

2016-11-02 Thread Jonathon Jongsma
Store the channel in the char device object, and unref it in dispose. Previously, we were just creating a channel and potentially allowing it to leak. There may be better long-term solutions, but this works for now. --- Changes from last version: - set channel to NULL in spicevmc_device_disconnec

[Spice-devel] [PATCH 3/3] Smartcard: store channel in device

2016-11-02 Thread Jonathon Jongsma
Commit 542bc478 removed the global smartcard channel, but never stored the newly-created channel anywhere. To avoid leaking the channel, store the channel as a private member of the device it is associated with. It will be unreffed when its associated device is destroyed. --- server/smartcard.c |

Re: [Spice-devel] [PATCH spice-server v2] Manage lifetime of RedVmcChannel

2016-11-02 Thread Jonathon Jongsma
On Wed, 2016-11-02 at 13:05 -0400, Frediano Ziglio wrote: > > > > > > On Wed, 2016-11-02 at 08:31 -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > On Wed, Nov 02, 2016 at 04:34:47AM -0400, Frediano Ziglio > > > > wrote: > > > > > > > > > > > > > > > >

Re: [Spice-devel] [PATCH spice-server] fixup! Re-arrange channel client creation to avoid exposing client lock

2016-11-02 Thread Jonathon Jongsma
Thanks, Acked-by: Jonathon Jongsma On Tue, 2016-11-01 at 15:37 +, Frediano Ziglio wrote: > Call red_client_add_channel at the end of initialisation. > This respect the previous order. > After returning from a successful red_client_add_channel another > thread could call some function in thi

Re: [Spice-devel] spice-gtk patch for skip openssl requires on FreeBSD platform

2016-11-02 Thread Pavel Grunt
Hi, Why is it needed - especially if FreeBSD ships it ? Pavel On Tue, 2016-11-01 at 22:15 +0300, Oleg Ginzburg wrote: > Hello, > > This patch skips openssl requires on FreeBSD platform: > > --- > --- configure.ac.bak2016-11-01 22:04:57.70700 +0300 > +++ configure.ac2016-11-01

[Spice-devel] [spice-common v2 2/9] protocol: add preferred video codec message

2016-11-02 Thread Victor Toso
From: Victor Toso Client might want to choose a preferred video codec for streaming for different reasons which having hardware decoder support being the most interest one. This message allows the client to send an array of video codecs in order of preference. Signed-off-by: Victor Toso --- c

[Spice-devel] [spice-gtk v2 3/9] Update spice-common

2016-11-02 Thread Victor Toso
From: Victor Toso Francois Gouget (1): codegen: Fix compatibility with Python 2.6 Frediano Ziglio (6): Start adding protocol file documentation Start writing some documentation on protocol Extended protocol documentation More work on attribute protocol documentation

[Spice-devel] [v2] Add preferred video codec type message

2016-11-02 Thread Victor Toso
From: Victor Toso Hi! So, another try on this. There is a FIXME in the last patch, related to changing the ranks dinamically and the implications on the current implementation. As always, many thanks for comments! Changes: v1->v2: * removing rank value from client-side (teuf by IRC) - The ra

[Spice-devel] [spice-server v2 8/9] reds: add support to ranks for video codecs

2016-11-02 Thread Victor Toso
From: Victor Toso This patch implements a new value to the preference introduced in 497fcbb0a315b034ba keeping it backwards compatible. The new value is the rank, which is an unsigned integer and should be set as last argument. e.g: encoder:codec:rank Video codecs will now be ordered by rank. T

[Spice-devel] [spice-server v2 6/9] Update spice-common

2016-11-02 Thread Victor Toso
From: Victor Toso Frediano Ziglio (6): Start adding protocol file documentation Start writing some documentation on protocol Extended protocol documentation More work on attribute protocol documentation Fix BNF notation in documentation Add protocol documentati

[Spice-devel] [spice-server v2 7/9] reds: set video codec in a different function

2016-11-02 Thread Victor Toso
From: Victor Toso Small refactor. This will be useful in the next patch. Signed-off-by: Victor Toso --- server/reds.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/server/reds.c b/server/reds.c index bfa479e..cd57592 100644 --- a/server/re

[Spice-devel] [spice-server v2 9/9] dcc: handle preferred video codec message

2016-11-02 Thread Victor Toso
From: Victor Toso [0] SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE This message provides a list of video codecs based on client's order of preference. We duplicate the video codecs array from reds.c and sort it using the order of codecs as reference. This message will not change an ongoing st

[Spice-devel] [spice-gtk v2 4/9] channel-display: implement preferred video codec msgc

2016-11-02 Thread Victor Toso
From: Victor Toso * SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE This message was introduced in protocol 0.12.13 to establish client side preference on video codec to be used in streams. At this moment, we only introduce a new API [0] to select *the* preferred video codec for client; In a late

[Spice-devel] [spice-gtk v2 5/9] spicy: implement preferred video codec type

2016-11-02 Thread Victor Toso
From: Victor Toso Similar to preferred video compression, a radio button showing mjpeg, vp8 and h264 in case server has the proper [0] capability [0] SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE Signed-off-by: Victor Toso --- src/spicy.c | 41 + 1 file chang

[Spice-devel] [spice-protocol v2 1/9] protocol: add preferred video codec message

2016-11-02 Thread Victor Toso
From: Victor Toso Client might want to choose a preferred video codec for streaming for different reasons which having hardware decoder support being the most interest one. This message allows the client to send a list of video codecs in a order of preference. Signed-off-by: Victor Toso --- s

[Spice-devel] [drm/qxl v2 5/7] qxl: Remove qxl_bo_init() return value

2016-11-02 Thread Christophe Fergeau
It's always returning 0, and it's always ignored. Signed-off-by: Christophe Fergeau --- Changes since v1: new patch drivers/gpu/drm/qxl/qxl_drv.h | 2 +- drivers/gpu/drm/qxl/qxl_gem.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers

[Spice-devel] [drm/qxl v2 6/7] qxl: Don't notify userspace when monitors config is unchanged

2016-11-02 Thread Christophe Fergeau
When the QXL driver receives a QXL_INTERRUPT_CLIENT_MONITORS_CONFIG interrupt, we currently always notify userspace that there was some hotplug event. However, gnome-shell/mutter is reacting to this event by attempting a resolution change, which it does by issueing drmModeRmFB, drmModeAddFB, and t

Re: [Spice-devel] [drm/qxl 5/6] qxl: Don't notify userspace when monitors config is unchanged

2016-11-02 Thread Christophe Fergeau
On Wed, Nov 02, 2016 at 05:31:28PM +0100, Christophe Fergeau wrote: > > > > > + if (client_head->flags != 0) { > > > + client_head->flags = 0; > > > + changed = true; > > > + } > > > > why testing flags change if is always 0 ? > > Yeah, same for su

Re: [Spice-devel] [PATCH spice-server v2] Manage lifetime of RedVmcChannel

2016-11-02 Thread Frediano Ziglio
> > On Wed, 2016-11-02 at 08:31 -0400, Frediano Ziglio wrote: > > > > > > > > > Hi, > > > > > > On Wed, Nov 02, 2016 at 04:34:47AM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > > > > > > > From: Jonathon Jongsma > > > > > > > > > > Store the channel in the char device object, and

[Spice-devel] [drm/qxl v2 1/7] qxl: Mark some internal functions as static

2016-11-02 Thread Christophe Fergeau
They are not used outside of their respective source file Signed-off-by: Christophe Fergeau Acked-by: Frediano Ziglio --- drivers/gpu/drm/qxl/qxl_cmd.c | 2 +- drivers/gpu/drm/qxl/qxl_display.c | 4 ++-- drivers/gpu/drm/qxl/qxl_drv.h | 3 --- 3 files changed, 3 insertions(+), 6 deletion

[Spice-devel] [drm/qxl v2 2/7] qxl: Remove unused prototype

2016-11-02 Thread Christophe Fergeau
qxl_crtc_set_from_monitors_config() is defined in qxl_drv.h but never implemented. Signed-off-by: Christophe Fergeau Acked-by: Frediano Ziglio --- drivers/gpu/drm/qxl/qxl_drv.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h in

[Spice-devel] [drm/qxl v2 7/7] qxl: Allow resolution which are not multiple of 8

2016-11-02 Thread Christophe Fergeau
The use of drm_cvt_mode() in qxl_add_monitors_config_modes() means that the resolutions we are going to present to user-space are going to be rounded down to a multiple of 8. In the QXL arbitrary resolution case, this is not useful. This commit forces the actual width/height that was requested by t

[Spice-devel] [drm/qxl v2 0/7] qxl: Various cleanups/fixes

2016-11-02 Thread Christophe Fergeau
Hey, Here is the v2 of my patch series. It improves a bit patch 6/7 readability following Frediano's review, and patch 5/7 is new and was suggested during review. The other patches are unchanged. Christophe ___ Spice-devel mailing list Spice-devel@list

[Spice-devel] [drm/qxl v2 4/7] qxl: Call qxl_gem_{init,fini}

2016-11-02 Thread Christophe Fergeau
qdev->gem.objects was initialized directly in qxl_device_init() rather than going through qxl_gem_init(), and qxl_gem_fini() was never called. Signed-off-by: Christophe Fergeau --- drivers/gpu/drm/qxl/qxl_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[Spice-devel] [drm/qxl v2 3/7] qxl: Add missing '\n' to qxl_io_log() call

2016-11-02 Thread Christophe Fergeau
The message has to be terminated by a newline as it's not going to get added automatically. Signed-off-by: Christophe Fergeau Acked-by: Frediano Ziglio --- drivers/gpu/drm/qxl/qxl_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu

Re: [Spice-devel] [drm/qxl 5/6] qxl: Don't notify userspace when monitors config is unchanged

2016-11-02 Thread Christophe Fergeau
Hey, On Mon, Oct 31, 2016 at 08:00:09AM -0400, Frediano Ziglio wrote: > > diff --git a/drivers/gpu/drm/qxl/qxl_display.c > > b/drivers/gpu/drm/qxl/qxl_display.c > > index 156b7de..edb90f6 100644 > > --- a/drivers/gpu/drm/qxl/qxl_display.c > > +++ b/drivers/gpu/drm/qxl/qxl_display.c > > @@ -57,11 +

Re: [Spice-devel] [PATCH spice-server v2 02/12] red-channel-client: Move incoming/ougoing initialization to constructor

2016-11-02 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-11-01 at 11:07 +, Frediano Ziglio wrote: > These fields need just channel to be set to be initialized. > Move their initialization to constructor to make sure > they are initialized as soon as possible. > > Signed-off-by: Frediano Ziglio > --- >  serv

Re: [Spice-devel] [drm/qxl 4/6] qxl: Call qxl_gem_{init,fini}

2016-11-02 Thread Christophe Fergeau
On Mon, Oct 31, 2016 at 07:42:35AM -0400, Frediano Ziglio wrote: > > > > qdev->gem.objects was initialized directly in qxl_device_init() rather > > than going through qxl_gem_init(), and qxl_gem_fini() was never called. > > > > Considering "qxl_gem_fini() was never called" did we have a leak? M

Re: [Spice-devel] [PATCH spice-server v2 12/12] fixup! Convert RedClient to GObject

2016-11-02 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-11-01 at 11:08 +, Frediano Ziglio wrote: > Remove unused declarations and refs field > > Signed-off-by: Frediano Ziglio > --- >  server/red-client.c | 1 - >  server/red-client.h | 1 - >  2 files changed, 2 deletions(-) > > diff --git a/server/red-cli

Re: [Spice-devel] [PATCH spice-server] fixup! Convert RedClient to GObject

2016-11-02 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-11-01 at 12:23 +, Frediano Ziglio wrote: > Revert file change. > glib-compat.h include is still necessary for RHEL6 compatibility. > > Signed-off-by: Frediano Ziglio > --- >  server/red-channel-client.c | 1 + >  1 file changed, 1 insertion(+) > > di

Re: [Spice-devel] [PATCH spice-server 3/6] red-channel-client: Init pipe field during init

2016-11-02 Thread Christophe Fergeau
On Mon, Oct 31, 2016 at 06:07:39AM -0400, Frediano Ziglio wrote: > > > > On Fri, Oct 28, 2016 at 11:59:53AM +0100, Frediano Ziglio wrote: > > > There was a chance that on error GQueue were not > > > initialized but an attempt to destroy it is made. > > > This assure GQueue is initialized as soon a

Re: [Spice-devel] [PATCH spice-server] Avoid to typedef twice RedChannel

2016-11-02 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-11-01 at 12:23 +, Frediano Ziglio wrote: > It's already defined in the same file some lines above. > > Signed-off-by: Frediano Ziglio > --- >  server/red-channel.h | 1 - >  1 file changed, 1 deletion(-) > > diff --git a/server/red-channel.h b/server

Re: [Spice-devel] [PATCH spice-server 4/6] red-channel-client: Move incoming/ougoing initialization to constructor

2016-11-02 Thread Christophe Fergeau
On Mon, Oct 31, 2016 at 06:10:59AM -0400, Frediano Ziglio wrote: > > > > On Fri, Oct 28, 2016 at 11:59:54AM +0100, Frediano Ziglio wrote: > > > These fields need just channel to be set to be initialized. > > > Move their initialization to constructor to make sure > > > they are initialized as soon

Re: [Spice-devel] [PATCH spice-server v2 11/12] fixup! Convert RedClient to GObject

2016-11-02 Thread Jonathon Jongsma
Personally, for lines that are this close to the length limit, I prefer to just leave them on one line. But I won't argue either way. Acked-by: Jonathon Jongsma On Tue, 2016-11-01 at 11:08 +, Frediano Ziglio wrote: > Style. > > Signed-off-by: Frediano Ziglio > --- >  server/red-client.h |

Re: [Spice-devel] [PATCH spice-server v2 01/12] red-channel-client: Init pipe field during init

2016-11-02 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-11-01 at 11:07 +, Frediano Ziglio wrote: > There was a chance that on error GQueue were not > initialized but an attempt to destroy it is made. > This ensures GQueue is initialized as soon as > possible. Note that red_channel_client_initable_init > is

[Spice-devel] [PATCH] Delay the exit call for the exit on disconnect function.

2016-11-02 Thread Jeremy White
This will allow client cleanup to happen. Signed-off-by: Jeremy White --- server/reds.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/reds.c b/server/reds.c index c235421..e380dd1 100644 --- a/server/reds.c +++ b/server/reds.c @@ -559,12 +559,6 @@ void r

Re: [Spice-devel] [PATCH spice-server v2] Manage lifetime of RedVmcChannel

2016-11-02 Thread Jonathon Jongsma
On Wed, 2016-11-02 at 08:31 -0400, Frediano Ziglio wrote: > > > > > > Hi, > > > > On Wed, Nov 02, 2016 at 04:34:47AM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > > > From: Jonathon Jongsma > > > > > > > > Store the channel in the char device object, and unref it in > > > > dispos

[Spice-devel] [vd_agent] vdagentd: Clean up and clarify the usage message

2016-11-02 Thread Francois Gouget
udsc is an internal library of sorts that's irrelevant to users. Signed-off-by: Francois Gouget --- src/vdagentd/vdagentd.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c index 13a84ce..18e82a7 100644 --- a/src/vdagen

[Spice-devel] [vd_agent] udscs: Clarify the udscs_read_callback() documentation

2016-11-02 Thread Francois Gouget
Signed-off-by: Francois Gouget --- src/udscs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/udscs.h b/src/udscs.h index e13750c..d65630d 100644 --- a/src/udscs.h +++ b/src/udscs.h @@ -39,8 +39,9 @@ struct udscs_message_header { }; /* Callbacks with this type wi

[Spice-devel] [vd_agent] vdagentd: Make the 'could not create server socket' message more helpful

2016-11-02 Thread Francois Gouget
EADDRINUSE usually means the socket file was left behind after a crash. Signed-off-by: Francois Gouget --- src/vdagentd/vdagentd.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c index 8dee414..13a84ce 100644 --- a/sr

Re: [Spice-devel] spiceqxl: Remove an unused macro

2016-11-02 Thread Jonathon Jongsma
On Wed, 2016-11-02 at 16:20 +0100, Francois Gouget wrote: > On Fri, 28 Oct 2016, Jonathon Jongsma wrote: > > > > > By the way, it's nice to know which repository the patch applies to > > by > > looking at the email subject. It just helps get into the proper > > frame > > of mind quickly before st

Re: [Spice-devel] spiceqxl: Remove an unused macro

2016-11-02 Thread Francois Gouget
On Fri, 28 Oct 2016, Jonathon Jongsma wrote: > By the way, it's nice to know which repository the patch applies to by > looking at the email subject. It just helps get into the proper frame > of mind quickly before starting to review. > > You can set that using the format.subjectprefix configurat

Re: [Spice-devel] [vdagent-linux] spice-vdagent.desktop: Set NoDisplay=true

2016-11-02 Thread Jonathon Jongsma
On Sat, 2016-10-29 at 14:54 -0400, Jeremy Bicha wrote: > On Sat, Oct 29, 2016 at 2:37 PM, Jonathon Jongsma m> wrote: > > > > This seems like a policy thing that different distributors could > > have > > different opinions about. However, I don't know if anybody else > > still > > ships this app,

Re: [Spice-devel] [PATCH spice-server v2] Manage lifetime of RedVmcChannel

2016-11-02 Thread Frediano Ziglio
> > Hi, > > On Wed, Nov 02, 2016 at 04:34:47AM -0400, Frediano Ziglio wrote: > > > > > > From: Jonathon Jongsma > > > > > > Store the channel in the char device object, and unref it in dispose. > > > Previously, we were just creating a channel and allowing it to leak. > > > There may be better

Re: [Spice-devel] [PATCH spice-server v2] Manage lifetime of RedVmcChannel

2016-11-02 Thread Victor Toso
Hi, On Wed, Nov 02, 2016 at 04:34:47AM -0400, Frediano Ziglio wrote: > > > > From: Jonathon Jongsma > > > > Store the channel in the char device object, and unref it in dispose. > > Previously, we were just creating a channel and allowing it to leak. > > There may be better long-term solutions,

[Spice-devel] spice-gtk patch for skip openssl requires on FreeBSD platform

2016-11-02 Thread Oleg Ginzburg
Hello, This patch skips openssl requires on FreeBSD platform: --- --- configure.ac.bak2016-11-01 22:04:57.70700 +0300 +++ configure.ac2016-11-01 22:05:35.981994000 +0300 @@ -108,7 +108,11 @@ PKG_CHECK_MODULES(SSL, openssl) AC_SUBST(SSL_CFLAGS) AC_SUBST(SSL_LIBS) -SPICE_GLIB_REQ

Re: [Spice-devel] [PATCH spice-server v2] Manage lifetime of RedVmcChannel

2016-11-02 Thread Frediano Ziglio
> > From: Jonathon Jongsma > > Store the channel in the char device object, and unref it in dispose. > Previously, we were just creating a channel and allowing it to leak. > There may be better long-term solutions, but this works for now. > --- > server/spicevmc.c | 27 -

[Spice-devel] [PATCH spice-server v2] Manage lifetime of RedVmcChannel

2016-11-02 Thread Frediano Ziglio
From: Jonathon Jongsma Store the channel in the char device object, and unref it in dispose. Previously, we were just creating a channel and allowing it to leak. There may be better long-term solutions, but this works for now. --- server/spicevmc.c | 27 --- 1 file change