[Spice-devel] [PATCH v4 08/17] drm/ttm: use gem vma_node

2019-08-01 Thread Gerd Hoffmann
Drop vma_node from ttm_buffer_object, use the gem struct (base.vma_node) instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- drivers/gpu/drm/qxl/qxl_object.h | 2 +- drivers/gpu/drm/radeon/radeon_object.h | 2 +-

[Spice-devel] [PATCH v4 15/17] drm/qxl: switch driver from bo->resv to bo->base.resv

2019-08-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Christian König --- drivers/gpu/drm/qxl/qxl_debugfs.c | 2 +- drivers/gpu/drm/qxl/qxl_release.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c index bdb5ac098

[Spice-devel] [PATCH v4 03/17] drm/qxl: use embedded gem object

2019-08-01 Thread Gerd Hoffmann
Drop drm_gem_object from qxl_bo, use the ttm_buffer_object.base instead. Signed-off-by: Gerd Hoffmann Acked-by: Christian König --- drivers/gpu/drm/qxl/qxl_drv.h | 6 +++--- drivers/gpu/drm/qxl/qxl_object.h | 4 ++-- drivers/gpu/drm/qxl/qxl_cmd.c | 4 ++-- drivers/gpu/drm/qxl/qxl_de

Re: [Spice-devel] [PATCH spice-server 2/3] glz-encoder: Remove useless __packed__ attribute

2019-08-01 Thread Frediano Ziglio
ping > > These structure contain only bytes, no need for this attribute. > > Signed-off-by: Frediano Ziglio > --- > server/glz-encoder.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/server/glz-encoder.c b/server/glz-encoder.c > index 341294035..ee9d95ae9 1006

Re: [Spice-devel] [PATCH spice-server 1/3] glz-encoder-dict: Remove useless __packed__ attribute

2019-08-01 Thread Frediano Ziglio
ping > > The structure has no holes, adding this attribute could only > decrease efficiency. > Note that HashEntry structure is used for a large (8MB) array so > this won't affect much possible container size. > > Signed-off-by: Frediano Ziglio > --- > server/glz-encoder-priv.h | 2 +- > 1 fil

Re: [Spice-devel] [PATCH spice-server 06/13] red-channel: Inline red_channel_pipes_create_batch

2019-08-01 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > The function is called only by red_channel_pipes_new_add. > > > > > > > > Signed-off-by: Frediano Ziglio > > > > --- > > > > server/red-channel.c | 20 > > > > 1 file changed, 4 insertions(+), 16

Re: [Spice-devel] [PATCH spice-server 09/13] dispatcher: Use a new API to handle events

2019-08-01 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > Instead of having to manually register the file descriptor and > > > > than need to call dispatcher_handle_recv_read just provide a single > > > > API to create the watch. > > > > This has some advantage: > > > > - repl

Re: [Spice-devel] [PATCH spice-server 03/13] char-device: Allocate all write buffer in a single block

2019-08-01 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > There are no much data other than the buffer, reduce the > > > > allocations. > > > > > > > > Signed-off-by: Frediano Ziglio > > > > --- > > > > server/char-device.c | 27 +++ > > > > server/c

Re: [Spice-devel] [PATCH spice-server v2 1/4] spicevmc: Do not use RedCharDevice pipe items handling

2019-08-01 Thread Frediano Ziglio
ping > > ping > > > > > ping the series > > > > > > > > As we don't use any token there's no reason to not queue directly instead > > > of passing through RedCharDevice. > > > This will make easier to limit the queue which currently is unlimited. > > > > > > RedCharDevice flow control has so

Re: [Spice-devel] [PATCH spice-server 02/13] char-device: Pull more code into red_char_device_send_to_client_tokens_absorb

2019-08-01 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping > > > > > > > > > > > ping > > > > > > > > > > > > > > The 2 callers red_char_device_send_to_client_tokens_set and > > > > > red_char_device_send_to_client_tokens_add are doing mostly > > > > > the same thing so put common code to > > > >

Re: [Spice-devel] [PATCH spice-server v2 1/2] char-device: Don't use RedClient API

2019-08-01 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > ping > > > > > > > > > > > ping the series > > > > > > > > > > > > > > RedClient was an opaque structure for RedCharDevice. > > > > > It started to be used when RedsState started to contain all > > > > > the global state. > > > > > Make it opaque agai

Re: [Spice-devel] [PATCH spice-streaming-agent 4/4] gst-plugin: reduce number of templates being used

2019-08-01 Thread Frediano Ziglio
> > > > > --- > > > > This patch is not really necessary, just a suggestion, it's a bit hacky > > but would save some code. > > Other options would be to use explicit template specialization or to > > leave it as is. > > > > Sure, what I don't like is that is surely not type safe, you can inst

Re: [Spice-devel] [PATCH spice-streaming-agent 3/4] gst-plugin: Free input buffer and XImage as soon as possible

2019-08-01 Thread Frediano Ziglio
> > > > > --- > > src/gst-plugin.cpp | 31 --- > > 1 file changed, 20 insertions(+), 11 deletions(-) > > > > diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp > > index 0a1d041..c7412c5 100644 > > --- a/src/gst-plugin.cpp > > +++ b/src/gst-plugin.cpp > > @@ -67,6

Re: [Spice-devel] [PATCH spice-streaming-agent 4/4] gst-plugin: reduce number of templates being used

2019-08-01 Thread Frediano Ziglio
> > --- > > This patch is not really necessary, just a suggestion, it's a bit hacky > but would save some code. > Other options would be to use explicit template specialization or to > leave it as is. > Sure, what I don't like is that is surely not type safe, you can instantiate a GstMiniObject

Re: [Spice-devel] [PATCH spice-streaming-agent 3/4] gst-plugin: Free input buffer and XImage as soon as possible

2019-08-01 Thread Frediano Ziglio
> > --- > src/gst-plugin.cpp | 31 --- > 1 file changed, 20 insertions(+), 11 deletions(-) > > diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp > index 0a1d041..c7412c5 100644 > --- a/src/gst-plugin.cpp > +++ b/src/gst-plugin.cpp > @@ -67,6 +67,15 @@ struct GstSam

Re: [Spice-devel] [PATCH spice-streaming-agent 1/4] gst-plugin: Allow ANY memory type to pass from convertor to encoder

2019-08-01 Thread Frediano Ziglio
Looks fine. But what are the difference? For instance what additional memory types we want to feed to the pipeline? > > --- > src/gst-plugin.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp > index 6415ac0..e9d9364 100644 > --

Re: [Spice-devel] [RFC spice-streaming-agent 1/2] gst-plugin: allow the instantiation of multiple GST encoder plugins

2019-08-01 Thread Kevin Pouget
Hello Snir, On Thu, Aug 1, 2019 at 5:02 PM Snir Sheriber wrote: > > Hi, > > > On 8/1/19 3:43 PM, Kevin Pouget wrote: > > On Wed, Jul 31, 2019 at 12:09 PM Kevin Pouget wrote: > >> On Wed, Jul 31, 2019 at 11:50 AM Frediano Ziglio > >> wrote: > With this patch, spice-streaming-agent can be l

Re: [Spice-devel] [PATCH spice-gtk] usb-device-manager: Remove unused parameter from spice_usb_device_manager_device_match

2019-08-01 Thread Snir Sheriber
Acked-by: Snir Sheriber On 8/1/19 4:04 PM, Frediano Ziglio wrote: Signed-off-by: Frediano Ziglio --- src/usb-device-manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 0a04b119..426a0cd7 100644 --- a/s

Re: [Spice-devel] [RFC spice-streaming-agent 1/2] gst-plugin: allow the instantiation of multiple GST encoder plugins

2019-08-01 Thread Snir Sheriber
Hi, On 8/1/19 3:43 PM, Kevin Pouget wrote: On Wed, Jul 31, 2019 at 12:09 PM Kevin Pouget wrote: On Wed, Jul 31, 2019 at 11:50 AM Frediano Ziglio wrote: With this patch, spice-streaming-agent can be launched with multiple Gstreamer video codecs enabled: spice-streaming-agent -c gst.codec=v

[Spice-devel] [PATCH spice-streaming-agent 3/4] gst-plugin: Free input buffer and XImage as soon as possible

2019-08-01 Thread Snir Sheriber
--- src/gst-plugin.cpp | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp index 0a1d041..c7412c5 100644 --- a/src/gst-plugin.cpp +++ b/src/gst-plugin.cpp @@ -67,6 +67,15 @@ struct GstSampleDeleter { using

[Spice-devel] [PATCH spice-streaming-agent 4/4] gst-plugin: reduce number of templates being used

2019-08-01 Thread Snir Sheriber
--- This patch is not really necessary, just a suggestion, it's a bit hacky but would save some code. Other options would be to use explicit template specialization or to leave it as is. --- src/gst-plugin.cpp | 44 ++-- 1 file changed, 14 insertions(+), 3

[Spice-devel] [PATCH spice-streaming-agent 2/4] gst-plugin: Allow generation gstreamer dot file

2019-08-01 Thread Snir Sheriber
Set GST_DEBUG_DUMP_DOT_DIR to specify where to place the generated .dot file --- src/gst-plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp index e9d9364..0a1d041 100644 --- a/src/gst-plugin.cpp +++ b/src/gst-plugin.cpp @@ -261,7

[Spice-devel] [PATCH spice-streaming-agent 1/4] gst-plugin: Allow ANY memory type to pass from convertor to encoder

2019-08-01 Thread Snir Sheriber
--- src/gst-plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp index 6415ac0..e9d9364 100644 --- a/src/gst-plugin.cpp +++ b/src/gst-plugin.cpp @@ -252,7 +252,7 @@ void GstreamerFrameCapture::pipeline_init(const GstreamerEncoderSe

Re: [Spice-devel] [spice-gtk 1/9] usb-redir: define interfaces to support emulated devices

2019-08-01 Thread Yuri Benditovich
On Thu, Aug 1, 2019 at 3:26 PM Victor Toso wrote: > > Hi, > > On Mon, Jul 29, 2019 at 12:26:11PM +0300, Yuri Benditovich wrote: > > On Mon, Jul 29, 2019 at 11:03 AM Frediano Ziglio wrote: > > > What does it means? The code cannot be improved before being > > > merged? It does not seem so crazy c

[Spice-devel] [PATCH spice-gtk] usb-device-manager: Remove unused parameter from spice_usb_device_manager_device_match

2019-08-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- src/usb-device-manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 0a04b119..426a0cd7 100644 --- a/src/usb-device-manager.c +++ b/src/usb-device-manager.c @@ -733,8 +733,8

Re: [Spice-devel] [RFC spice-streaming-agent 1/2] gst-plugin: allow the instantiation of multiple GST encoder plugins

2019-08-01 Thread Kevin Pouget
On Wed, Jul 31, 2019 at 12:09 PM Kevin Pouget wrote: > > On Wed, Jul 31, 2019 at 11:50 AM Frediano Ziglio wrote: > > > > > > > > With this patch, spice-streaming-agent can be launched with multiple > > > Gstreamer video codecs enabled: > > > > > > > spice-streaming-agent -c gst.codec=vp8 -c gst.c

Re: [Spice-devel] [spice-gtk 1/9] usb-redir: define interfaces to support emulated devices

2019-08-01 Thread Victor Toso
Hi, On Mon, Jul 29, 2019 at 12:26:11PM +0300, Yuri Benditovich wrote: > On Mon, Jul 29, 2019 at 11:03 AM Frediano Ziglio wrote: > > What does it means? The code cannot be improved before being > > merged? It does not seem so crazy change to make to me. As > > I said multiple time I can do that

Re: [Spice-devel] [protocol] protocol: Add some comments to vd_agentd.h

2019-08-01 Thread Frediano Ziglio
> > Signed-off-by: Francois Gouget > --- > > Just a minor patch partly inspired by a patch from Frediano Ziglio. > 5975a98a94e0 at git://people.freedesktop.org/~fziglio/spice-protocol > Thanks to take it > The "client|server" comments bear verification: they're based on a > comment in do_clie

[Spice-devel] [PATCH spice-gtk 1/2] usb-device-manager: Fix number truncation by spice_usb_device_get_busnum

2019-08-01 Thread Frediano Ziglio
"bus" field is 16 bit so returning using a guint8 type potentially truncate the value. Signed-off-by: Frediano Ziglio --- src/usb-device-manager-priv.h | 2 +- src/usb-device-manager.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usb-device-manager-priv.h b/src

[Spice-devel] [PATCH spice-gtk 2/2] usb-device-manager: Fix reference counting getting devices

2019-08-01 Thread Frediano Ziglio
spice_usb_device_manager_device_to_bdev increments usb device counter. The function is just used to check for filter but than the counter is not decremented causing the object to be leaked later (or invalid reference counter anyway). Decrement the counter in any case. Signed-off-by: Frediano Zigli

Re: [Spice-devel] [PATCH v2 x11spice 2/2] Provide compatibility for Glamor in Xorg 1.17.

2019-08-01 Thread Frediano Ziglio
> > In Xorg 1.18, X changed so that GLAMOR_USE_EGL_SCREEN was the only > flag required and it implies the behavior previously requested > with the GLAMOR_USE_SCREEN and GLAMORE_USE_PICTURE_SCREEN flags. > Thus, if we are building against an older Xorg, we need to specify > those now deprecated fla