[Spice-devel] [PATCH v5] spice: set device address and device display ID in QXL interface

2019-02-15 Thread Lukáš Hrázký
the deprecated spice_qxl_set_max_monitors, the new interface function replaces it. Signed-off-by: Lukáš Hrázký --- Hi, sorry about the noise, v4 still isn't passing the check. I didn't know the check script is in the git tree. This one should pass. Changes since v4: * Really fix comments according

[Spice-devel] [PATCH v4] spice: set device address and device display ID in QXL interface

2019-02-15 Thread Lukáš Hrázký
the deprecated spice_qxl_set_max_monitors, the new interface function replaces it. Signed-off-by: Lukáš Hrázký --- Hi, Changes since v3: * Fix comments according to patchew check script. Cheers, Lukas hw/display/qxl.c | 14 ++- include/ui/spice-display.h | 4 ui/spice-core.c

[Spice-devel] [PATCH] spice: set device address and device display ID in QXL interface

2019-02-11 Thread Lukáš Hrázký
the deprecated spice_qxl_set_max_monitors, the new interface function replaces it. Signed-off-by: Lukáš Hrázký --- Hi, I've fixed the undefined reference by checking the parent_dev pointer directly instead of through pci_bus_is_root(), that was the only function needed that's not built with PCI_CONFIG=n

Re: [Spice-devel] [PATCH spice-server] red-stream-device: Fix "make syntax-check"

2019-01-31 Thread Lukáš Hrázký
Hi, On Thu, 2019-01-31 at 11:44 +0100, Christophe Fergeau wrote: > On Wed, Jan 30, 2019 at 03:13:06PM +, Frediano Ziglio wrote: > > Avoid using strncpy, considered not secure. > > In this case a simple memcpy is used, we are going to terminate > > the string in any case on the next line. > >

Re: [Spice-devel] [PATCH spice-server] red-stream-device: Fix "make syntax-check"

2019-01-30 Thread Lukáš Hrázký
Just sent the same patch... oh well. Acked-by: Lukáš Hrázký On Wed, 2019-01-30 at 15:13 +, Frediano Ziglio wrote: > Avoid using strncpy, considered not secure. > In this case a simple memcpy is used, we are going to terminate > the string in any case on the next line. >

[Spice-devel] [PATCH spice] red-stream-device: use memcpy instead of strncpy

2019-01-30 Thread Lukáš Hrázký
Signed-off-by: Lukáš Hrázký --- server/red-stream-device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/red-stream-device.c b/server/red-stream-device.c index 440b2689..2a210cc7 100644 --- a/server/red-stream-device.c +++ b/server/red-stream-device.c @@ -330,9

Re: [Spice-devel] [PATCH linux vdagent v5 0/7] Use the PCI addr and display ID

2019-01-29 Thread Lukáš Hrázký
For the series: Acked-by: Lukáš Hrázký On Wed, 2019-01-23 at 16:18 -0600, Jonathon Jongsma wrote: > This is a patch set that handles the PCI address and device dispay ID > sent down to the agent by the server, and uses that to maintain a map > for looking up a particular xran

[Spice-devel] [PATCH spice-streaming-agent v5 5/6] Send the GraphicsDeviceInfo to the server

2019-01-29 Thread Lukáš Hrázký
Adds serialization of the GraphicsDeviceInfo message and sends it to the server when it starts to stream. Signed-off-by: Lukáš Hrázký Acked-by: Jonathon Jongsma --- configure.ac | 2 +- src/spice-streaming-agent.cpp | 65 ++- 2 files changed

[Spice-devel] [PATCH spice-streaming-agent v4 4/6] Interface + implementation of getting device display info

2019-01-28 Thread Lukáš Hrázký
version is rather limited and may not work for more complex setups) as well as some helper functions to make it easier for plugins to implement this and avoid code duplication. Implements the new interface method for the two built-in plugins (mjpeg-fallback and gst-plugin). Signed-off-by: Lukáš

[Spice-devel] [PATCH spice v4 2/6] Receive the GraphicsDeviceInfo message from the streaming agent

2019-01-28 Thread Lukáš Hrázký
Receives the GraphicsDeviceInfo message from the streaming agent and stores the data in a list on the streaming device. Signed-off-by: Lukáš Hrázký --- server/display-limits.h| 3 ++ server/red-qxl.c | 2 +- server/red-stream-device.c | 78

[Spice-devel] [PATCH vd_agent v4 6/6] Receive the graphics_device_info message

2019-01-28 Thread Lukáš Hrázký
The graphics_device_info message contains the device display ID information (device address and device display ID). Stores the data in a hash table in vdagent. Signed-off-by: Lukáš Hrázký Acked-by: Jonathon Jongsma --- configure.ac | 2 +- src/vdagent/vdagent.c| 3

[Spice-devel] [PATCH spice v4 1/6] Send the graphics device info to the vd_agent

2019-01-28 Thread Lukáš Hrázký
Sends the device address and device display IDs to the vdagent. The message is sent either in reaction to the SPICE_MSGC_MAIN_AGENT_START message or when the graphics device info changes. Signed-off-by: Lukáš Hrázký Acked-by: Jonathon Jongsma --- configure.ac | 2 +- meson.build

[Spice-devel] [PATCH spice-streaming-agent v4 5/6] Send the GraphicsDeviceInfo to the server

2019-01-28 Thread Lukáš Hrázký
Adds serialization of the GraphicsDeviceInfo message and sends it to the server when it starts to stream. Signed-off-by: Lukáš Hrázký Reviewed-by: Jonathon Jongsma --- configure.ac | 2 +- src/spice-streaming-agent.cpp | 60 +-- 2 files changed

[Spice-devel] [PATCH v4 0/6] Monitor ID between host and guest

2019-01-28 Thread Lukáš Hrázký
Hello, this series introduces a new mechanism to identify monitors across the host and guest boundary, using the pair (device_address and device_display_id). device_address is a HW address of a graphics device (a PCI address to be specific, though other address domains can be used as well),

[Spice-devel] [PATCH spice v4 3/6] Send the graphics device info from streaming agent to the vd_agent

2019-01-28 Thread Lukáš Hrázký
Adds the graphics device info from the streaming device(s) to the VDAgentGraphicsDeviceInfo message sent to the vd_agent. Signed-off-by: Lukáš Hrázký Acked-by: Jonathon Jongsma --- server/red-stream-device.c | 18 +++ server/red-stream-device.h | 7 + server/reds.c

[Spice-devel] [PATCH] QXL interface: improve the spice_qxl_set_device_info documentation

2019-01-28 Thread Lukáš Hrázký
Instead of one unsupported example, present two real world examples. Signed-off-by: Lukáš Hrázký --- server/spice-qxl.h | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/server/spice-qxl.h b/server/spice-qxl.h index e7af5e5e..2f47910b 100644

Re: [Spice-devel] [PATCH linux vdagent v4 9/9] Make cursor work with mjpeg streaming

2019-01-18 Thread Lukáš Hrázký
I'd also squash this up to 7/9. It just reworks what was not a complete solution. Cheers, Lukas On Thu, 2019-01-17 at 16:14 -0600, Jonathon Jongsma wrote: > In the case where we have an mjpeg plugin running in the streaming > agent, we have two spice displays representing the same guest

Re: [Spice-devel] [PATCH linux vdagent v4 8/9] Send display IDs to daemon when device info changes

2019-01-18 Thread Lukáš Hrázký
I'd squash this to the previous patch. On Thu, 2019-01-17 at 16:14 -0600, Jonathon Jongsma wrote: > When the agent gets a new device info message (from the daemon), we need > to re-calculate the guest output map and send that information back down > to the daemon so that it can handle mouse

Re: [Spice-devel] [PATCH linux vdagent v4 7/9] Send display_id down to the vdagentd daemon

2019-01-18 Thread Lukáš Hrázký
ht) > @@ -1075,11 +1103,12 @@ void vdagent_x11_send_daemon_guest_xorg_res(struct > vdagent_x11 *x11, int update) > for (i = 0; i < screen_count; i++) { > struct vdagentd_guest_xorg_resolution *curr = [i]; > if (!get_monitor_info_for_output_index(x11, i, >x, >

Re: [Spice-devel] [PATCH linux vdagent v4 6/9] Use new function in vdagent_x11_send_daemon_guest_xorg_res()

2019-01-18 Thread Lukáš Hrázký
Reviewed-by: Lukáš Hrázký On Thu, 2019-01-17 at 16:14 -0600, Jonathon Jongsma wrote: > Rather than getting the current guest resolution in a > VDAgentMonitorsConfig struct and then translating it to a new struct > type for sending down to the daemon, simply use the new

Re: [Spice-devel] [PATCH linux vdagent v4 5/9] Factor a function out of get_current_mon_config()

2019-01-18 Thread Lukáš Hrázký
;monitors[i].x = crtc->x; > -mon_config->monitors[i].y = crtc->y; > -mon_config->monitors[i].width = mode->width; > -mon_config->monitors[i].height = mode->height; > +VDAgentMonConfig *mon = _config->monitors[i]; > +mon->x = x; > +mon->y = y; > +mon->width = width; > +mon->height = height; > num_of_monitors = i + 1; > } > mon_config->num_of_monitors = num_of_monitors; Reviewed-by: Lukáš Hrázký ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH linux vdagent v4 4/9] Use guest output map to determine xrandr output

2019-01-18 Thread Lukáš Hrázký
dd_and_set(x11, output_index, x, y, width, height) > && > enabled_monitors(mon_config) == 1) { > -set_screen_to_best_size(x11, width, height, > -_w, _h); > -break; > +set_screen_to_best_size(x11, width, height, > +_w, _h); > +break; > +} > +} else { > +syslog(LOG_WARNING, "Unable to find a guest output index for > spice display %i", i); > } > } Reviewed-by: Lukáš Hrázký ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH linux vdagent v4 2/9] Look up and store xrandr output in display map

2019-01-18 Thread Lukáš Hrázký
log(LOG_ERR, "could not connect to X-server"); > @@ -322,12 +322,6 @@ struct vdagent_x11 *vdagent_x11_create(struct > udscs_connection *vdagentd, > __func__, net_wm_name, vdagent_x11_has_icons_on_desktop(x11)); > g_free(net_wm_name); >

Re: [Spice-devel] [PATCH linux vdagent v4 1/9] Add lookup_xrand_output_for_device_info()

2019-01-18 Thread Lukáš Hrázký
assert(!compare_addresses(, )); > +} > +// mismatched slot > +{ > +PciDevice da1 = {0, 0, 2, 0}; > +PciAddress a1 = {0, NULL}; > +a1.domain = 0; > +a1.devices = g_list_append(a1.devices, ); > + > +PciDevice db1 = {0, 0

Re: [Spice-devel] [PATCH spice-streaming-agent 7/8 v3] Send the GraphicsDeviceInfo to the server

2019-01-18 Thread Lukáš Hrázký
On Thu, 2019-01-17 at 14:29 -0600, Jonathon Jongsma wrote: > On Wed, 2019-01-16 at 13:52 +0100, Lukáš Hrázký wrote: > > Adds serialization of the GraphicsDeviceInfo message and sends it to > > the > > server when it starts to stream. > > > > Signed-off-by: Luk

Re: [Spice-devel] [PATCH spice-streaming-agent 6/8 v3] Interface + implementation of getting device display info

2019-01-18 Thread Lukáš Hrázký
On Thu, 2019-01-17 at 14:09 -0600, Jonathon Jongsma wrote: > A couple minor comments below. > > On Wed, 2019-01-16 at 13:52 +0100, Lukáš Hrázký wrote: > > Adds an interface method to the FrameCapture class to get the device > > display info (device address and device display

Re: [Spice-devel] [PATCH spice 5/8 v3] Send the graphics device info from streaming agent to the vd_agent

2019-01-18 Thread Lukáš Hrázký
On Thu, 2019-01-17 at 13:10 -0600, Jonathon Jongsma wrote: > On Wed, 2019-01-16 at 13:52 +0100, Lukáš Hrázký wrote: > > Adds the graphics device info from the streaming device(s) to the > > VDAgentGraphicsDeviceInfo message sent to the vd_agent. > > > >

Re: [Spice-devel] [PATCH spice-protocol 2/8 v3] Add the StreamMsgGraphicsDeviceInfo message

2019-01-18 Thread Lukáš Hrázký
019-01-16 at 13:52 +0100, Lukáš Hrázký wrote: > > The message contains information about the graphics device and > > monitor > > belonging to a particular video stream (which maps to a channel) from > > the streaming agent. > > > > Signed-off-by: Lukáš Hrázký

[Spice-devel] [PATCH spice-streaming-agent 6/8 v3] Interface + implementation of getting device display info

2019-01-16 Thread Lukáš Hrázký
version is rather limited and may not work for more complex setups) as well as some helper functions to make it easier for plugins to implement this and avoid code duplication. Implements the new interface method for the two built-in plugins (mjpeg-fallback and gst-plugin). Signed-off-by: Lukáš

[Spice-devel] [PATCH spice 4/8 v3] Receive the GraphicsDeviceInfo message from the streaming agent

2019-01-16 Thread Lukáš Hrázký
Receives the GraphicsDeviceInfo message from the streaming agent and stores the data in a list on the streaming device. Signed-off-by: Lukáš Hrázký --- server/display-limits.h| 3 ++ server/red-qxl.c | 2 +- server/red-stream-device.c | 78

[Spice-devel] [PATCH spice 5/8 v3] Send the graphics device info from streaming agent to the vd_agent

2019-01-16 Thread Lukáš Hrázký
Adds the graphics device info from the streaming device(s) to the VDAgentGraphicsDeviceInfo message sent to the vd_agent. Signed-off-by: Lukáš Hrázký --- server/red-stream-device.c | 18 +++ server/red-stream-device.h | 7 + server/reds.c | 63

[Spice-devel] [PATCH spice-protocol 2/8 v3] Add the StreamMsgGraphicsDeviceInfo message

2019-01-16 Thread Lukáš Hrázký
The message contains information about the graphics device and monitor belonging to a particular video stream (which maps to a channel) from the streaming agent. Signed-off-by: Lukáš Hrázký Acked-by: Frediano Ziglio --- spice/stream-device.h | 31 +++ 1 file changed

[Spice-devel] [PATCH vd_agent 8/8 v3] Receive the graphics_device_info message

2019-01-16 Thread Lukáš Hrázký
The graphics_device_info message contains the device display ID information (device address and device display ID). Stores the data in a hash table in vdagent. Signed-off-by: Lukáš Hrázký --- src/vdagent/vdagent.c| 3 ++ src/vdagent/x11-priv.h | 1 + src/vdagent/x11-randr.c

[Spice-devel] [PATCH spice-streaming-agent 7/8 v3] Send the GraphicsDeviceInfo to the server

2019-01-16 Thread Lukáš Hrázký
Adds serialization of the GraphicsDeviceInfo message and sends it to the server when it starts to stream. Signed-off-by: Lukáš Hrázký --- src/spice-streaming-agent.cpp | 54 +-- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/src/spice-streaming

[Spice-devel] [PATCH spice-protocol 1/8 v3] Add the VDAgentGraphicsDeviceInfo message

2019-01-16 Thread Lukáš Hrázký
The message serves for passing the device address and device display ID information for all display channels from SPICE server to the vd_agent. Signed-off-by: Lukáš Hrázký Acked-by: Frediano Ziglio --- spice/vd_agent.h | 23 +++ 1 file changed, 23 insertions(+) diff --git

Re: [Spice-devel] [PATCH spice 4/8 v2] Receive the GraphicsDeviceInfo message from the streaming agent

2019-01-16 Thread Lukáš Hrázký
On Tue, 2019-01-15 at 08:31 -0500, Frediano Ziglio wrote: > > > > Receives the GraphicsDeviceInfo message from the streaming agent and > > stores the data in a list on the streaming device. > > > > Signed-off-by: Lukáš Hrázký > > --- > > server/display

[Spice-devel] [PATCH vd_agent 8/8 v2] Receive the graphics_device_info message

2019-01-14 Thread Lukáš Hrázký
The graphics_device_info message contains the device display ID information (device address and device display ID). Stores the data in a hash table in vdagent. Signed-off-by: Lukáš Hrázký --- src/vdagent/vdagent.c| 3 ++ src/vdagent/x11-priv.h | 1 + src/vdagent/x11-randr.c

[Spice-devel] [PATCH spice-protocol 1/8 v2] Add the VDAgentGraphicsDeviceInfo message

2019-01-14 Thread Lukáš Hrázký
The message serves for passing the device address and device display ID information for all display channels from SPICE server to the vd_agent. Signed-off-by: Lukáš Hrázký --- spice/vd_agent.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/spice/vd_agent.h b/spice

[Spice-devel] [PATCH spice 5/8 v2] Send the graphics device info from streaming agent to the vd_agent

2019-01-14 Thread Lukáš Hrázký
Adds the graphics device info from the streaming device(s) to the VDAgentGraphicsDeviceInfo message sent to the vd_agent. Signed-off-by: Lukáš Hrázký --- server/red-stream-device.c | 18 +++ server/red-stream-device.h | 7 + server/reds.c | 63

[Spice-devel] [PATCH spice-streaming-agent 7/8 v2] Interface + implementation of getting device display info

2019-01-14 Thread Lukáš Hrázký
version is rather limited and may not work for more complex setups) as well as some helper functions to make it easier for plugins to implement this and avoid code duplication. Implements the new interface method for the two built-in plugins (mjpeg-fallback and gst-plugin). Signed-off-by: Lukáš

[Spice-devel] [PATCH spice 3/8 v2] Send the graphics device info to the vd_agent

2019-01-14 Thread Lukáš Hrázký
Sends the device address and device display IDs to the vdagent. The message is sent either in reaction to the SPICE_MSGC_MAIN_AGENT_START message or when the graphics device info changes. Signed-off-by: Lukáš Hrázký --- server/red-qxl.c | 20 + server/red-qxl.h | 3

[Spice-devel] [PATCH 0/8 v2] Monitor ID between host and guest

2019-01-14 Thread Lukáš Hrázký
Hello, this series introduces a new mechanism to identify monitors across the host and guest boundary, using the pair (device_address and device_display_id). device_address is a HW address of a graphics device (a PCI address to be specific, though other address domains can be used as well),

[Spice-devel] [PATCH spice-protocol 2/8 v2] Add the StreamMsgGraphicsDeviceInfo message

2019-01-14 Thread Lukáš Hrázký
The message contains information about the graphics device and monitor belonging to a particular video stream (which maps to a channel) from the streaming agent. Signed-off-by: Lukáš Hrázký --- spice/stream-device.h | 31 +++ 1 file changed, 31 insertions(+) diff

[Spice-devel] [PATCH spice-streaming-agent 6/8 v2] Export symbols in the binary to use by the plugins

2019-01-14 Thread Lukáš Hrázký
("default") attribute to the namespace containing the Error class, as that one needs to be exported and have its typeinfo defined for exception catching to work. Signed-off-by: Lukáš Hrázký Acked-by: Frediano Ziglio --- include/spice-streaming-agent/error.hpp | 2 +- src/M

Re: [Spice-devel] [PATCH spice-streaming-agent 6/8] Interface + implementation of getting device display info

2019-01-11 Thread Lukáš Hrázký
is and avoid code > > duplication. > > > > Implements the new interface method for the two built-in plugins > > (mjpeg-fallback and gst-plugin). > > > > Signed-off-by: Lukáš Hrázký > > --- > > configure.ac | 2 + >

Re: [Spice-devel] [PATCH spice-protocol 2/8] Add the StreamMsgGraphicsDeviceInfo message

2019-01-11 Thread Lukáš Hrázký
On Fri, 2019-01-11 at 05:45 -0500, Frediano Ziglio wrote: > > On Thu, 2019-01-10 at 14:28 -0600, Jonathon Jongsma wrote: > > > On Wed, 2019-01-09 at 12:43 +0100, Lukáš Hrázký wrote: > > > > On Wed, 2019-01-09 at 02:38 -0500, Frediano Ziglio wrote: > > > >

Re: [Spice-devel] [PATCH spice 1/3] QXL interface: add a function to identify monitors in the guest

2019-01-11 Thread Lukáš Hrázký
On Wed, 2019-01-09 at 11:36 -0600, Jonathon Jongsma wrote: > On Tue, 2019-01-08 at 16:26 +0100, Lukáš Hrázký wrote: > > Adds a function to let QEMU provide information to identify graphics > > devices and their monitors in the guest. The function > > (spice_qxl_set_device_

Re: [Spice-devel] [PATCH spice 3/8] Send the graphics device info to the vd_agent

2019-01-11 Thread Lukáš Hrázký
On Thu, 2019-01-10 at 15:07 -0600, Jonathon Jongsma wrote: > On Tue, 2019-01-08 at 16:28 +0100, Lukáš Hrázký wrote: > > Sends the device address and device display IDs to the vdagent. The > > message is sent either in reaction to the SPICE_MSGC_MAIN_AGENT_START > > message

Re: [Spice-devel] [PATCH spice-protocol 2/8] Add the StreamMsgGraphicsDeviceInfo message

2019-01-11 Thread Lukáš Hrázký
On Thu, 2019-01-10 at 14:28 -0600, Jonathon Jongsma wrote: > On Wed, 2019-01-09 at 12:43 +0100, Lukáš Hrázký wrote: > > On Wed, 2019-01-09 at 02:38 -0500, Frediano Ziglio wrote: > > > > > > > > The message contains information about the graphics device and

Re: [Spice-devel] [PATCH spice-protocol 1/8] Add the VDAgentGraphicsDeviceInfo message

2019-01-11 Thread Lukáš Hrázký
Hi, On Thu, 2019-01-10 at 14:13 -0600, Jonathon Jongsma wrote: > On Tue, 2019-01-08 at 16:28 +0100, Lukáš Hrázký wrote: > > The message serves for passing the device address and device display > > ID > > information for all display channels from SPICE server to the > >

Re: [Spice-devel] [PATCH spice 4/8] Receive the GraphicsDeviceInfo message from the streaming agent

2019-01-11 Thread Lukáš Hrázký
Hi, On Thu, 2019-01-10 at 15:27 -0600, Jonathon Jongsma wrote: > On Tue, 2019-01-08 at 16:28 +0100, Lukáš Hrázký wrote: > > Receives the GraphicsDeviceInfo message from the streaming agent and > > stores the data in a list on the streaming device. > > > >

Re: [Spice-devel] [PATCH linux vdagent v3 3/9] Look up and store xrandr output in display map

2019-01-09 Thread Lukáš Hrázký
On Mon, 2019-01-07 at 15:50 -0600, Jonathon Jongsma wrote: > Instead of storing each device address and device display ID in the hash > table, simply use the lookup_xrandr_output_for_device_info() function to > look up the ID of the xrandr output and store that in the hash table. > --- >

Re: [Spice-devel] [PATCH linux vdagent v2 1/9] Add lookup_xrand_output_for_device_info()

2019-01-09 Thread Lukáš Hrázký
Hello, On Thu, 2019-01-03 at 16:45 -0600, Jonathon Jongsma wrote: > Add a function to look up an xrandr output for a given device display > id. This uses sysfs and the drm subsystem to lookup information about a > graphics device output. It then compares the drm output name to xrandr > output

Re: [Spice-devel] [PATCH spice 5/8] Send the graphics device info from streaming agent to the vd_agent

2019-01-09 Thread Lukáš Hrázký
On Wed, 2019-01-09 at 03:25 -0500, Frediano Ziglio wrote: > > > > Adds the graphics device info from the streaming device(s) to the > > VDAgentGraphicsDeviceInfo message sent to the vd_agent. > > > > Signed-off-by: Lukáš Hrázký > > --- > > server/red-s

Re: [Spice-devel] [PATCH spice 3/8] Send the graphics device info to the vd_agent

2019-01-09 Thread Lukáš Hrázký
> > > TODO: doesn't resend the message on agent reconnect, FIXIT. > > Why is this a problem? What if the agent get restarted? Ah, sorry, forgot this TODO here. It is the agent reconnect issue we discussed (off-list). I'll remove this TODO, we are taking care of it. > > > >

Re: [Spice-devel] [PATCH spice-protocol 1/8] Add the VDAgentGraphicsDeviceInfo message

2019-01-09 Thread Lukáš Hrázký
splay channels from SPICE server to the vd_agent. > > > > > > > > Signed-off-by: Lukáš Hrázký > > > > --- > > > > spice/vd_agent.h | 15 +++ > > > > 1 file changed, 15 insertions(+) > > > > > > > > diff

Re: [Spice-devel] [PATCH spice-protocol 1/8] Add the VDAgentGraphicsDeviceInfo message

2019-01-09 Thread Lukáš Hrázký
On Wed, 2019-01-09 at 02:41 -0500, Frediano Ziglio wrote: > > > > The message serves for passing the device address and device display ID > > information for all display channels from SPICE server to the vd_agent. > > > > Signed-off-by: Lukáš Hrázký >

[Spice-devel] [PATCH spice-streaming-agent 6/8] Interface + implementation of getting device display info

2019-01-08 Thread Lukáš Hrázký
version is rather limited and may not work for more complex setups) as well as some helper functions to make it easier for plugins to implement this and avoid code duplication. Implements the new interface method for the two built-in plugins (mjpeg-fallback and gst-plugin). Signed-off-by: Lukáš

[Spice-devel] [PATCH vd_agent 8/8] Receive the graphics_device_info message

2019-01-08 Thread Lukáš Hrázký
The graphics_device_info message contains the device display ID information (device address and device display ID). Stores the data in a hash table in vdagent. Signed-off-by: Lukáš Hrázký --- src/vdagent/vdagent.c| 3 ++ src/vdagent/x11-priv.h | 1 + src/vdagent/x11-randr.c

[Spice-devel] [PATCH spice 4/8] Receive the GraphicsDeviceInfo message from the streaming agent

2019-01-08 Thread Lukáš Hrázký
Receives the GraphicsDeviceInfo message from the streaming agent and stores the data in a list on the streaming device. Signed-off-by: Lukáš Hrázký --- server/red-qxl.c | 1 - server/red-stream-device.c | 66 -- server/red-stream-device.h | 8

[Spice-devel] [PATCH spice 3/8] Send the graphics device info to the vd_agent

2019-01-08 Thread Lukáš Hrázký
Sends the device address and device display IDs to the vdagent. The message is sent either in reaction to the SPICE_MSGC_MAIN_AGENT_START message or when the graphics device info changes. TODO: doesn't resend the message on agent reconnect, FIXIT. Signed-off-by: Lukáš Hrázký --- server/red

[Spice-devel] [PATCH spice-protocol 2/8] Add the StreamMsgGraphicsDeviceInfo message

2019-01-08 Thread Lukáš Hrázký
The message contains information about the graphics device and monitor belonging to a particular video stream (which maps to a channel) from the streaming agent. Signed-off-by: Lukáš Hrázký --- spice/stream-device.h | 9 + 1 file changed, 9 insertions(+) diff --git a/spice/stream

[Spice-devel] [PATCH spice 5/8] Send the graphics device info from streaming agent to the vd_agent

2019-01-08 Thread Lukáš Hrázký
Adds the graphics device info from the streaming device(s) to the VDAgentGraphicsDeviceInfo message sent to the vd_agent. Signed-off-by: Lukáš Hrázký --- server/red-stream-device.c | 14 ++ server/red-stream-device.h | 4 +++ server/reds.c | 56

[Spice-devel] [PATCH 0/8] Monitor ID between host and guest

2019-01-08 Thread Lukáš Hrázký
Hello, this series introduces a new mechanism to identify monitors across the host and guest boundary, using the pair (device_address and device_display_id). device_address is a HW address of a graphics device (a PCI address to be specific, though other address domains can be used as well),

[Spice-devel] [PATCH spice-protocol 1/8] Add the VDAgentGraphicsDeviceInfo message

2019-01-08 Thread Lukáš Hrázký
The message serves for passing the device address and device display ID information for all display channels from SPICE server to the vd_agent. Signed-off-by: Lukáš Hrázký --- spice/vd_agent.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/spice/vd_agent.h b/spice

[Spice-devel] [PATCH qemu 3/3] spice: set device address and device display ID in QXL interface

2019-01-08 Thread Lukáš Hrázký
the deprecated spice_qxl_set_max_monitors, the new interface function replaces it. Signed-off-by: Lukáš Hrázký --- hw/display/qxl.c | 14 - include/ui/spice-display.h | 2 ++ ui/spice-core.c| 42 ++ ui/spice-display.c | 11

[Spice-devel] [PATCH spice/qemu 0/3] QXL interface to set monitor ID

2019-01-08 Thread Lukáš Hrázký
Hello, this is the final version of the new QXL interface to identify the graphics device monitors in the guest. This interface adds a function that allows to set the device path (e.g. a PCI path) and the IDs of the device's displays from QEMU to SPICE server. The server will forward this

[Spice-devel] [PATCH spice 2/3] QXL interface: deprecate spice_qxl_set_max_monitors

2019-01-08 Thread Lukáš Hrázký
Replace it by spice_qxl_set_device_info. Note we can't use monitors_count for what's stored in max_monitors, because monitors_count denotes the length of the device_display_ids array, which spice_qxl_set_max_monitors doesn't touch. Signed-off-by: Lukáš Hrázký --- server/red-qxl.c | 1

[Spice-devel] [PATCH spice 1/3] QXL interface: add a function to identify monitors in the guest

2019-01-08 Thread Lukáš Hrázký
off-by: Lukáš Hrázký --- server/red-qxl.c | 44 ++ server/spice-qxl.h | 46 server/spice-server.syms | 5 + 3 files changed, 95 insertions(+) diff --git a/server/red-qxl.c b/server/red-qxl.c index 97940

Re: [Spice-devel] [PATCH linux vdagent 01/10] Add lookup_xrand_output_for_device_info()

2018-12-18 Thread Lukáš Hrázký
Hi, sorry about piecemealing this. On Thu, 2018-12-13 at 16:46 -0600, Jonathon Jongsma wrote: > Add a function to look up an xrandr output for a given device display > id. This uses sysfs and the drm subsystem to lookup information about a > graphics device output. It then compares the drm

Re: [Spice-devel] [PATCH linux vdagent 06/10] Make clearer distinctions between output ids

2018-12-17 Thread Lukáš Hrázký
ent_x11_set_monitor_config(struct vdagent_x11 > *x11, > g_free(config); > > for (i = mon_config->num_of_monitors; i < x11->randr.res->noutput; i++) > -xrandr_disable_output(x11, i); > +xrandr_disable_nth_output(x11, i); > > /* First, disable disabled CRTCs

Re: [Spice-devel] [PATCH linux vdagent 02/10] Fix confusion between output index and crtc index

2018-12-17 Thread Lukáš Hrázký
utput only has a single crtc > s = XRRSetCrtcConfig(x11->display, x11->randr.res, > - x11->randr.res->crtcs[output], > + oinfo->crtcs[0], > CurrentTime, 0, 0, None, RR_Rotate_0, >

Re: [Spice-devel] [PATCH linux vdagent 01/10] Add lookup_xrand_output_for_device_info()

2018-12-17 Thread Lukáš Hrázký
* Hello, On Thu, 2018-12-13 at 16:46 -0600, Jonathon Jongsma wrote: > Add a function to look up an xrandr output for a given device display > id. This uses sysfs and the drm subsystem to lookup information about a > graphics device output. It then compares the drm output name to xrandr > output

[Spice-devel] [PATCH spice-streaming-agent 2/3] Move the syslog() helper for errors to a new utils module

2018-12-04 Thread Lukáš Hrázký
The syslog() helper for logging an error is not necessary, leave it out of the API and move it to a new private utils module. Signed-off-by: Lukáš Hrázký --- include/spice-streaming-agent/error.hpp | 8 src/Makefile.am | 1 + src/cursor-updater.cpp

[Spice-devel] [PATCH spice-streaming-agent 3/3] Export symbols in the binary to use by the plugins

2018-12-04 Thread Lukáš Hrázký
("default") attribute to the namespace containing the Error class, as that one needs to be exported and have its typeinfo defined for exception catching to work. Signed-off-by: Lukáš Hrázký --- include/spice-streaming-agent/error.hpp | 2 +- src/Makefile.am |

[Spice-devel] [PATCH spice-streaming-agent 1/3] Make error.hpp and the Error class a public API

2018-12-04 Thread Lukáš Hrázký
and clang so for these two compilers it is safe. Signed-off-by: Lukáš Hrázký --- include/spice-streaming-agent/Makefile.am | 1 + .../spice-streaming-agent}/error.hpp | 22 +-- src/Makefile.am | 2 -- src/cursor-updater.cpp

[Spice-devel] [PATCH spice-streaming-agent 0/3] Add an Error to the API

2018-12-04 Thread Lukáš Hrázký
caught. Cheers, Lukas Lukáš Hrázký (3): Make error.hpp and the Error class a public API Move the syslog() helper for errors to a new utils module Export symbols in the binary to use by the plugins include/spice-streaming-agent/Makefile.am | 1 + include/spice-streaming-agent/error.hpp

Re: [Spice-devel] [PATCH vd_agent_linux v2] vdagent: Stop trying to connect to the daemon after a while

2018-11-20 Thread Lukáš Hrázký
On Mon, 2018-11-19 at 11:42 -0500, Frediano Ziglio wrote: > > > > On Mon, 2018-11-19 at 10:23 +, Frediano Ziglio wrote: > > > Do not try indefinitely to connect to the daemon, should not > > > take long to activate. > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > >

Re: [Spice-devel] [PATCH vd_agent_linux v2] vdagent: Stop trying to connect to the daemon after a while

2018-11-19 Thread Lukáš Hrázký
On Mon, 2018-11-19 at 10:23 +, Frediano Ziglio wrote: > Do not try indefinitely to connect to the daemon, should not > take long to activate. > > Signed-off-by: Frediano Ziglio > --- > src/vdagent/vdagent.c | 6 ++ > 1 file changed, 6 insertions(+) > > Changes since v1: > - log error

Re: [Spice-devel] [PATCH vd_agent_linux] vdagent: Stop trying to connect to the daemon after a while

2018-11-19 Thread Lukáš Hrázký
Hi, On Fri, 2018-11-16 at 16:21 +, Frediano Ziglio wrote: > Do not try indefinitely to connect to the daemon, should not > take long to activate. > > Signed-off-by: Frediano Ziglio > --- > src/vdagent/vdagent.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git

Re: [Spice-devel] [RFC PATCH spice-protocol 1/3] Add a graphics device info message

2018-11-13 Thread Lukáš Hrázký
On Mon, 2018-11-12 at 14:44 -0600, Jonathon Jongsma wrote: > On Mon, 2018-11-12 at 11:01 +0100, Lukáš Hrázký wrote: > > On Thu, 2018-11-08 at 11:36 -0600, Jonathon Jongsma wrote: > > > On Wed, 2018-11-07 at 18:23 +0100, Lukáš Hrázký wrote: > > > > The message serves

Re: [Spice-devel] [RFC linux vdagent] Add POC for getting xrandr output from monitor ID

2018-11-13 Thread Lukáš Hrázký
Hi, On Tue, 2018-11-13 at 09:04 +0100, Gerd Hoffmann wrote: > Hi, > > > To look up a PCI device by address, I could use the /sys filesystem. So > > for pci//02.0, I would translate the domain into the > > filesystem path '/sys/devices/pci:00/' assuming bus '00'? And then > > look

Re: [Spice-devel] [RFC PATCH spice-protocol 1/3] Add a graphics device info message

2018-11-12 Thread Lukáš Hrázký
On Thu, 2018-11-08 at 11:36 -0600, Jonathon Jongsma wrote: > On Wed, 2018-11-07 at 18:23 +0100, Lukáš Hrázký wrote: > > The message serves for passing the device address and device display > > ID > > "serves for passing..." is a little strange to my ear.

Re: [Spice-devel] [RFC linux vdagent] Add POC for getting xrandr output from monitor ID

2018-11-08 Thread Lukáš Hrázký
Hello, On Mon, 2018-11-05 at 17:09 -0600, Jonathon Jongsma wrote: > This is just a proof of concept utility that takes a PCI device address > and a monitor ID and finds the xrandr output associated with that > monitor id. > --- > > Changes in v2: > - used different format for specifying the PCI

Re: [Spice-devel] [RFC PATCH vd_agent 3/3] Receive the graphics_device_info message

2018-11-08 Thread Lukáš Hrázký
On Thu, 2018-11-08 at 05:18 -0500, Frediano Ziglio wrote: > > > > The graphics_device_info message contains the device display ID > > information (device address and device display ID). Stores the data in a > > hash table in vdagent. > > > > Signed-off-by: Lu

Re: [Spice-devel] spice-streaming-agent can't work correctly

2018-11-08 Thread Lukáš Hrázký
Hello, On Thu, 2018-11-08 at 17:38 +0800, wangjiedong wrote: > Recently I compile spice-protocol-0.12.15 and > spice-server-0.14.1(--enable-lz4=yes --enable-gstreamer=yes > --enable-smartcard=yes --with-sasl=yes) on host Ubuntu 18.04, and compile > spice-protocol-0.12.15 and

Re: [Spice-devel] [RFC PATCH spice v3 1/3] QXL interface: add a function to identify monitors in the guest

2018-11-08 Thread Lukáš Hrázký
On Wed, 2018-11-07 at 16:01 -0600, Jonathon Jongsma wrote: > On Wed, 2018-11-07 at 11:49 +0100, Lukáš Hrázký wrote: > > Adds a function to let QEMU provide information to identify graphics > > devices and their monitors in the guest. The function > > (spice_qxl_set_device_

Re: [Spice-devel] [RFC PATCH spice v3 1/3] QXL interface: add a function to identify monitors in the guest

2018-11-08 Thread Lukáš Hrázký
Hello, On Thu, 2018-11-08 at 07:49 +0100, Gerd Hoffmann wrote: > Hi, > > > + * The device_display_id_{start,count} denotes the sequence of device > > display > > + * IDs that map to the zero-based sequence of monitor IDs provided by > > monitors > > + * config on this interface. For example

Re: [Spice-devel] [PATCH spice-server] char-device: Remove initial underscores from __red_char_device_write_buffer_get

2018-11-08 Thread Lukáš Hrázký
t; } else { > dev->priv->cur_write_buf = > -__red_char_device_write_buffer_get(dev, NULL, > +red_char_device_write_buffer_get(dev, NULL, > mig_data->write_size, WRITE_BUFFER_ORIGIN_SERVER, 0); &

[Spice-devel] [RFC PATCH 0/3] Send the device display info to the vd_agent

2018-11-07 Thread Lukáš Hrázký
Hello, this series follows these two: https://lists.freedesktop.org/archives/spice-devel/2018-November/046088.html https://lists.freedesktop.org/archives/spice-devel/2018-November/046093.html It sends the graphics device info (I've added the "graphics" to the name here, as "device info" seems

[Spice-devel] [RFC PATCH vd_agent 3/3] Receive the graphics_device_info message

2018-11-07 Thread Lukáš Hrázký
The graphics_device_info message contains the device display ID information (device address and device display ID). Stores the data in a hash table in vdagent. Signed-off-by: Lukáš Hrázký --- src/vdagent/vdagent.c| 69 src/vdagentd-proto-strings.h

[Spice-devel] [RFC PATCH spice 2/3] Send the graphics device info to the vd_agent

2018-11-07 Thread Lukáš Hrázký
Sends the device address and device display IDs to the vdagent. The message is sent either in reaction to the SPICE_MSGC_MAIN_AGENT_START message or when the graphics device ino changes. Signed-off-by: Lukáš Hrázký --- server/red-qxl.c | 20 + server/red-qxl.h | 3

[Spice-devel] [RFC PATCH spice-protocol 1/3] Add a graphics device info message

2018-11-07 Thread Lukáš Hrázký
The message serves for passing the device address and device display ID information for all display channels from SPICE server to the vd_agent. Signed-off-by: Lukáš Hrázký --- spice/vd_agent.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/spice/vd_agent.h b/spice

[Spice-devel] [PATCH spice 1/2] char-device: separate functions to get write buffer for client and server

2018-11-07 Thread Lukáš Hrázký
shouldn't need to parametrize that. For the server case, add a use_token parameter instead of a separate red_char_device_write_buffer_get_server_no_token function, as you may want to parametrize that. Signed-off-by: Lukáš Hrázký --- server/char-device.c | 22

[Spice-devel] [PATCH spice 0/2] small refactor of char-device buffer creation

2018-11-07 Thread Lukáš Hrázký
Hello, this is a small refactor I did for the char-device write buffer creation, in particular for creating a write buffer for the vd_agent. Of note, I didn't know how to test the smartcard and spicevmc codepaths, I just assume they should be fine... Lukáš Hrázký (2): char-device: separate

[Spice-devel] [PATCH spice 2/2] reds: move vdagent write buffer creation into a function

2018-11-07 Thread Lukáš Hrázký
Adds a function to create a write buffer for sending a message to vdagent from the server to prevent code duplication. Signed-off-by: Lukáš Hrázký --- server/reds.c | 76 +++ 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/server

[Spice-devel] [RFC PATCH qemu v3 3/3] spice: set device address and device display ID in QXL interface

2018-11-07 Thread Lukáš Hrázký
the deprecated spice_qxl_set_max_monitors, the new interface function replaces it. Signed-off-by: Lukáš Hrázký --- hw/display/qxl.c | 14 - include/ui/spice-display.h | 2 ++ ui/spice-core.c| 42 ++ ui/spice-display.c | 11

[Spice-devel] [RFC PATCH spice/qemu v3 0/3] QXL interface to set monitor ID

2018-11-07 Thread Lukáš Hrázký
Hello, another version of the proposed API for monitor identification information. Still not for merge yet, the plan is to merge when it's complete. Changes since v2: * Merged the two API functions into one: spice_qxl_set_device_info(QXLInstance *instance, const

[Spice-devel] [RFC PATCH spice v3 2/3] QXL interface: deprecate spice_qxl_set_max_monitors

2018-11-07 Thread Lukáš Hrázký
Replace it by spice_qxl_set_device_info. Note we can't use monitors_count for what's stored in max_monitors, because monitors_count denotes the length of the device_display_ids array, which spice_qxl_set_max_monitors doesn't touch. Signed-off-by: Lukáš Hrázký --- server/red-qxl.c | 1

[Spice-devel] [RFC PATCH spice v3 1/3] QXL interface: add a function to identify monitors in the guest

2018-11-07 Thread Lukáš Hrázký
off-by: Lukáš Hrázký --- server/red-qxl.c | 44 ++ server/spice-qxl.h | 46 server/spice-server.syms | 5 + 3 files changed, 95 insertions(+) diff --git a/server/red-qxl.c b/server/red-qxl.c index 97940

  1   2   3   4   5   6   >