Re: [Spice-devel] UMS memory management

2013-03-27 Thread Dave Airlie
> > Can you please explain how all this relates to Dave's work on the KMS? He > mentioned that he implemented paging there as well. Well we won't be using the KMS driver in RHEL6, so we need to improve the old UMS driver for that use case. Though I expect UMS eviction will hit the same problems I

Re: [Spice-devel] [xf86-video-qxl (take 2)] Make the Deferred FPS mode available in all cases, not just XSPICE.

2013-03-27 Thread Hans de Goede
Hi, Looks good, ack. Regards, Hans On 03/27/2013 07:39 PM, Jeremy White wrote: Signed-off-by: Jeremy White --- This time without the spice-server build requirements of the prior version. src/Makefile.am |1 + src/dfps.c | 57 +++

[Spice-devel] [xf86-video-qxl (take 2)] Make the Deferred FPS mode available in all cases, not just XSPICE.

2013-03-27 Thread Jeremy White
Signed-off-by: Jeremy White --- This time without the spice-server build requirements of the prior version. src/Makefile.am |1 + src/dfps.c | 57 +++--- src/dfps.h | 17 +--- src/qxl.h| 11 +++

Re: [Spice-devel] [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

2013-03-27 Thread Uri Lublin
On 03/27/2013 06:49 PM, Hans de Goede wrote: Hi, As discussed as a solution for this *for now*, this series looks good, ACK series. One remark, which can be fixed with an add on patch, or added to patch 9, around line 734 (in unpatches sources), in spice_usb_device_manager_add_dev, there is

Re: [Spice-devel] [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

2013-03-27 Thread Uri Lublin
On 03/27/2013 06:13 PM, Hans de Goede wrote: Hi, On 03/27/2013 04:33 PM, Uri Lublin wrote: On 03/25/2013 12:17 PM, Hans de Goede wrote: Hi, Hi Hans, Thanks for reviewing. On 03/25/2013 11:01 AM, Uri Lublin wrote: rhbz#842816 It seems that sometimes a USB device's bus.address is changin

Re: [Spice-devel] [spice-gtk PATCHv2] Keep GSocketConnection around after initial connect

2013-03-27 Thread Christophe Fergeau
On Wed, Mar 27, 2013 at 12:03:40PM -0400, Marc-André Lureau wrote: > > @@ -2209,6 +2209,7 @@ reconnect: > > goto cleanup; > > } > > } > > +c->sock = > > g_object_ref(G_OBJECT(g_socket_connection_get_socket(c->conn))); > > The G_OBJECT is unnecessary Yeah I know, I t

Re: [Spice-devel] [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

2013-03-27 Thread Hans de Goede
Hi, As discussed as a solution for this *for now*, this series looks good, ACK series. One remark, which can be fixed with an add on patch, or added to patch 9, around line 734 (in unpatches sources), in spice_usb_device_manager_add_dev, there is: if (!device) { g_warning("Could no

Re: [Spice-devel] [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

2013-03-27 Thread Hans de Goede
Hi, On 03/27/2013 04:33 PM, Uri Lublin wrote: On 03/25/2013 12:17 PM, Hans de Goede wrote: Hi, Hi Hans, Thanks for reviewing. On 03/25/2013 11:01 AM, Uri Lublin wrote: rhbz#842816 It seems that sometimes a USB device's bus.address is changing after installation of WinUSB driver for that

Re: [Spice-devel] [spice-gtk PATCHv2] Keep GSocketConnection around after initial connect

2013-03-27 Thread Marc-André Lureau
- Mensaje original - > There has been reports of recent spice-gtk versions not working on > RHEL6 or Ubuntu 10.04. This happens because these systems have > an older glib version without: > > commit a0e1b226a21ca498b301981b0c89e89ad9a31eb1 > Author: Dan Winship > Date: Fri Apr 23 08:4

Re: [Spice-devel] [xf86-video-qxl] Make the Deferred FPS mode available in all cases, not just XSPICE.

2013-03-27 Thread Jeremy White
> I guess this is why the build time dependency is needed. But since > you now define a custom struct for this in dfps.c, can't we just > have a "struct SpiceTimer;" somewhere, without needing to build-time > depend on spice-server ? Also is it just me, or do the dfps.c > changes break xspice mode

[Spice-devel] [spice-gtk PATCHv2] Keep GSocketConnection around after initial connect

2013-03-27 Thread Christophe Fergeau
There has been reports of recent spice-gtk versions not working on RHEL6 or Ubuntu 10.04. This happens because these systems have an older glib version without: commit a0e1b226a21ca498b301981b0c89e89ad9a31eb1 Author: Dan Winship Date: Fri Apr 23 08:47:18 2010 -0400 GSocketConnection: don't

Re: [Spice-devel] [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

2013-03-27 Thread Uri Lublin
On 03/25/2013 12:17 PM, Hans de Goede wrote: Hi, Hi Hans, Thanks for reviewing. On 03/25/2013 11:01 AM, Uri Lublin wrote: rhbz#842816 It seems that sometimes a USB device's bus.address is changing after installation of WinUSB driver for that device. So instead use vid:pid which are consis

Re: [Spice-devel] [xf86-video-qxl] Make the Deferred FPS mode available in all cases, not just XSPICE.

2013-03-27 Thread Hans de Goede
Hi, On 03/27/2013 04:12 PM, Jeremy White wrote: Signed-off-by: Jeremy White --- configure.ac | 18 +- src/Makefile.am |2 ++ src/dfps.c | 40 +++- src/dfps.h |1 + src/qxl.h| 12 +--- src/q

Re: [Spice-devel] [spice-gtk] Keep GSocketConnection around after initial connect

2013-03-27 Thread Marc-André Lureau
On Wed, Mar 27, 2013 at 4:08 PM, Christophe Fergeau wrote: > I can indeed add a g_object_ref() where g_socket_connection_get_socket() is > called and remove the c->sock = NULL; bit from if (c->conn){} Yeah, that would be nicer. thanks ack otherwise -- Marc-André Lureau ___

[Spice-devel] [xf86-video-qxl] Make the Deferred FPS mode available in all cases, not just XSPICE.

2013-03-27 Thread Jeremy White
Signed-off-by: Jeremy White --- configure.ac | 18 +- src/Makefile.am |2 ++ src/dfps.c | 40 +++- src/dfps.h |1 + src/qxl.h| 12 +--- src/qxl_driver.c | 23 ++- src/qxl_uxa.c

Re: [Spice-devel] [spice-gtk] Keep GSocketConnection around after initial connect

2013-03-27 Thread Christophe Fergeau
On Wed, Mar 27, 2013 at 03:59:26PM +0100, Marc-André Lureau wrote: > On Wed, Mar 27, 2013 at 3:53 PM, Christophe Fergeau > wrote: > > +if (c->conn) { > > +g_object_unref(c->conn); > > +c->sock = NULL; > > +c->conn = NULL; > > +} > > if (c->sock) { > >

Re: [Spice-devel] [spice-gtk] Keep GSocketConnection around after initial connect

2013-03-27 Thread Marc-André Lureau
On Wed, Mar 27, 2013 at 3:53 PM, Christophe Fergeau wrote: > +if (c->conn) { > +g_object_unref(c->conn); > +c->sock = NULL; > +c->conn = NULL; > +} > if (c->sock) { > g_object_unref(c->sock); > c->sock = NULL; Can we remove the if (c->sock) b

Re: [Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

2013-03-27 Thread Hans de Goede
Hi, On 03/27/2013 03:51 PM, Marc-André Lureau wrote: - Mensaje original - Hi, On 03/27/2013 01:57 PM, Marc-André Lureau wrote: On Wed, Mar 27, 2013 at 1:52 PM, Hans de Goede wrote: Really a function named try_keyboard_ungrab, should not touch the mouse_grab, it is as simple as tha

[Spice-devel] [spice-gtk] Keep GSocketConnection around after initial connect

2013-03-27 Thread Christophe Fergeau
There has been reports of recent spice-gtk versions not working on RHEL6 or Ubuntu 10.04. This happens because these systems have an older glib version without: commit a0e1b226a21ca498b301981b0c89e89ad9a31eb1 Author: Dan Winship Date: Fri Apr 23 08:47:18 2010 -0400 GSocketConnection: don't

Re: [Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

2013-03-27 Thread Marc-André Lureau
- Mensaje original - > Hi, > > On 03/27/2013 01:57 PM, Marc-André Lureau wrote: > > On Wed, Mar 27, 2013 at 1:52 PM, Hans de Goede > > wrote: > >> Really a function named try_keyboard_ungrab, should not touch the > >> mouse_grab, it is as simple as that. > > > > This argument doesn't ho

Re: [Spice-devel] UMS memory management

2013-03-27 Thread Alon Levy
> Hi, > On 03/27/2013 06:17 AM, Hans de Goede wrote: > > Hi, > > > > On 03/27/2013 09:07 AM, Søren Sandmann wrote: > >> Hello, > >> > >> The following is some notes on what I am planning to do for UMS > >> memory > >> management. It basically amounts to a rewrite of qxl-surface-ums.c > > > > Looks

Re: [Spice-devel] UMS memory management

2013-03-27 Thread Yonit Halperin
Hi, On 03/27/2013 06:17 AM, Hans de Goede wrote: Hi, On 03/27/2013 09:07 AM, Søren Sandmann wrote: Hello, The following is some notes on what I am planning to do for UMS memory management. It basically amounts to a rewrite of qxl-surface-ums.c Looks / sounds good, a few remarks below (note I

Re: [Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

2013-03-27 Thread Hans de Goede
Hi, On 03/27/2013 01:57 PM, Marc-André Lureau wrote: On Wed, Mar 27, 2013 at 1:52 PM, Hans de Goede wrote: Really a function named try_keyboard_ungrab, should not touch the mouse_grab, it is as simple as that. This argument doesn't hold. If you prefer I rename it to "ungrab_keyboard_and_poin

Re: [Spice-devel] qemu / spice server option passing help

2013-03-27 Thread Jeremy White
> Since this effects only the guest driver, and then only the guest > driver for one platform, this really should not be handled through qemu > and the rom at all IMHO. Guest driver options should use whatever is > the common mechanism in that platform to set driver options, so in > this case xorg.

Re: [Spice-devel] UMS memory management

2013-03-27 Thread Yonit Halperin
Hi, Sounds good. see my comments inline. On 03/27/2013 04:07 AM, Søren Sandmann wrote: Hello, The following is some notes on what I am planning to do for UMS memory management. It basically amounts to a rewrite of qxl-surface-ums.c Comments appreciated, especially regarding eviction policy, wh

Re: [Spice-devel] [spice-xpi 4/5] Add SpiceControllerWin class

2013-03-27 Thread Christophe Fergeau
Hi, On Mon, Mar 25, 2013 at 08:06:27AM -0400, Marc-André Lureau wrote: > - Mensaje original - > > > In general, returning true on success is easier to read. > > > > This mimics the return value of connect(2), I'd prefer to keep that > > (at > > least in that patch, can be improved as a s

[Spice-devel] [spice-xpi PATCHv2 2/2] Add glib Windows logging

2013-03-27 Thread Christophe Fergeau
As it's not very convenient to get logging output from the plugin while firefox is running, this commit adds a dumb glib logging implementation that writes the logging information to a file. As this is not efficient at all, it's disabled by default unless the SPICE_XPI_LOG_TO_FILE environment varia

[Spice-devel] [spice-xpi PATCHv2 1/2] Add SpiceControllerWin class

2013-03-27 Thread Christophe Fergeau
This class implements the controller interface for Windows/mingw. --- Changes since v1: - Adjusted copyright notice - Initialize random seed with current time - Simplify error handling in several places by bailing out early - Use TEXT() instead of recoding it - Use g_shell_parse_argv() rather than

Re: [Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

2013-03-27 Thread Marc-André Lureau
On Wed, Mar 27, 2013 at 1:52 PM, Hans de Goede wrote: > Really a function named try_keyboard_ungrab, should not touch the > mouse_grab, it is as simple as that. This argument doesn't hold. If you prefer I rename it to "ungrab_keyboard_and_pointer" for example. Having only a pointer grab is a non

Re: [Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

2013-03-27 Thread Hans de Goede
Hi, On 03/27/2013 01:41 PM, Marc-André Lureau wrote: On Wed, Mar 27, 2013 at 11:54 AM, Hans de Goede wrote: I would like to see the above block changed to: if (event->keyboard) { try_keyboard_ungrab(self); try_mouse_ungrab(self); } else { This should also fix th

Re: [Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

2013-03-27 Thread Marc-André Lureau
On Wed, Mar 27, 2013 at 11:54 AM, Hans de Goede wrote: > I would like to see the above block changed to: > > if (event->keyboard) { > try_keyboard_ungrab(self); > try_mouse_ungrab(self); > } else { > > This should also fix the issue you're trying to fix. With the added >

Re: [Spice-devel] UMS memory management

2013-03-27 Thread Hans de Goede
Hi, On 03/27/2013 12:04 PM, Søren Sandmann wrote: Hans de Goede writes: Hmm, I assume with host-memory you mean guest memory here, right? iow surfaces will be moved by the driver from video-memory to X-server allocated memory (which in a vm is guest memory). I'm assuming this is what you mea

Re: [Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

2013-03-27 Thread Hans de Goede
Hi, On 03/26/2013 09:33 PM, Marc-André Lureau wrote: On windows, the client receives a WM_KILLFOCUS event which generates solely a keyboard grab-broken event. This event is received when pressing ctrl-alt-del (to show up the task manager), and we need to release the pointer grab and clip region

Re: [Spice-devel] qemu / spice server option passing help

2013-03-27 Thread Hans de Goede
Hi, On 03/26/2013 09:59 PM, Jeremy White wrote: Here is the current patch set. I'd appreciate feedback on whether this is horribly offensive. If not, I'll submit the qemu patch upstream, and the spice-protocol and xf86-video-qxl patches here. With these three patches, a qemu -spice deferre

Re: [Spice-devel] UMS memory management

2013-03-27 Thread Hans de Goede
Hi, On 03/27/2013 09:07 AM, Søren Sandmann wrote: Hello, The following is some notes on what I am planning to do for UMS memory management. It basically amounts to a rewrite of qxl-surface-ums.c Looks / sounds good, a few remarks below (note I'm not an expert on this piece of the spice code).

[Spice-devel] UMS memory management

2013-03-27 Thread Søren Sandmann
Hello, The following is some notes on what I am planning to do for UMS memory management. It basically amounts to a rewrite of qxl-surface-ums.c Comments appreciated, especially regarding eviction policy, where my current plan is very naive: Just keep kicking out the least recently used surface u