Re: [Spice-devel] [PATCH] qxl-wddm-dod: prevent failure of power on transition

2019-03-10 Thread Yuri Benditovich
Ping On Thu, Feb 28, 2019 at 10:42 AM Yuri Benditovich wrote: > > On return from S3 the driver may receive failure when > calls DxgkCbAcquirePostDisplayOwnership. In general the > driver is not expected to use this method when returns > from S3 but it is not simple to distinguish between S3 >

[Spice-devel] [spice-gtk 08/13] usb-redir: change signal prototype of win-usb-dev

2019-03-10 Thread Yuri Benditovich
Changing signal definition from (boxed-boxed) to (pointer,int). There is no need for additional referencing of GUdevDevice object before signal callback. Second parameter (action) is 0 for device removal and 1 for device addition. Signed-off-by: Yuri Benditovich --- src/usb-device-manager.c |

[Spice-devel] [spice-gtk 07/13] usb-redir: discard cold-plug device list under Windows

2019-03-10 Thread Yuri Benditovich
Discard the optimization of initial device enumeration. Just after connection to 'udev' signal request to report all the devices one by one as if they are inserted. Further commits will remove device enumeration in usb-dev-manager completely. Signed-off-by: Yuri Benditovich ---

[Spice-devel] [spice-gtk 13/13] win-usb-dev: remove unused code

2019-03-10 Thread Yuri Benditovich
Remove unused code related to GUdevDevice. Signed-off-by: Yuri Benditovich --- src/win-usb-dev.c | 74 --- src/win-usb-dev.h | 27 - 2 files changed, 101 deletions(-) diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c index

[Spice-devel] [spice-gtk 10/13] win-usb-dev: maintain list of libusb devices

2019-03-10 Thread Yuri Benditovich
Change internal device list to maintain libusb devices instead of GUdevDevice objects. Create temporary GUdevDevice object only for indication to usb-dev-manager. Signed-off-by: Yuri Benditovich --- src/win-usb-dev.c | 80 ++- 1 file changed, 51

[Spice-devel] [spice-gtk 11/13] win-usb-dev: report libusb_device via signal

2019-03-10 Thread Yuri Benditovich
Change the signal to report libusb_device instead of GUdevDevice object. This simplifies the callback procedure in usb-dev-manager and avoids additional reenumeration immediately after reenumeration that already done by win-usb-dev. Signed-off-by: Yuri Benditovich --- src/usb-device-manager.c |

[Spice-devel] [spice-gtk 01/13] usb-redir: replace USE_GUDEV with G_OS_WIN32

2019-03-10 Thread Yuri Benditovich
Replacing USE_GUDEV with G_OS_WIN32 anywhere. GUDEV simulation is used only in Windows build. Signed-off-by: Yuri Benditovich --- src/usb-device-manager.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/usb-device-manager.c

[Spice-devel] [spice-gtk 04/13] usb-redir: do not add device if one with the same bus:addr exists

2019-03-10 Thread Yuri Benditovich
In initial device enumeration hotplug notification can be called twice with the same libusb device. For details, see http://libusb.sourceforge.net/api-1.0/group__libusb__hotplug.html#ga00e0c69ddf1fb1b6774dc918192e8dc7 Filter out devices that already present in the list. Remove indentical call in

[Spice-devel] [spice-gtk 02/13] usb-redir: remove unused 'subsystem' parameter

2019-03-10 Thread Yuri Benditovich
Removing unused parameter for GUdevClient constructor. Signed-off-by: Yuri Benditovich --- src/usb-device-manager.c | 5 + src/win-usb-dev.c| 2 +- src/win-usb-dev.h| 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/usb-device-manager.c

[Spice-devel] [spice-gtk 03/13] usb-redir: reuse libusb context under Windows

2019-03-10 Thread Yuri Benditovich
Do not create own libusb context in usb-device-manager. Reuse existing context created by win-usb-dev instead. Signed-off-by: Yuri Benditovich --- src/usb-device-manager.c | 11 +-- src/win-usb-dev.c| 4 src/win-usb-dev.h| 1 + 3 files changed, 10 insertions(+), 6

[Spice-devel] [spice-gtk 12/13] usb-redir: use persistent libusb_device under Windows also

2019-03-10 Thread Yuri Benditovich
Unify SpiceUsbDeviceInfo for Linux and Windows by using persistent libusb_device. Signed-off-by: Yuri Benditovich --- src/usb-device-manager.c | 105 --- 1 file changed, 105 deletions(-) diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index

[Spice-devel] [spice-gtk 06/13] win-usb-dev: remove unused procedure

2019-03-10 Thread Yuri Benditovich
Remove unused g_udev_device_get_sysfs_attr. Signed-off-by: Yuri Benditovich --- src/win-usb-dev.c | 18 -- src/win-usb-dev.h | 1 - 2 files changed, 19 deletions(-) diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c index d96e52a..85ffd26 100644 --- a/src/win-usb-dev.c +++

[Spice-devel] [spice-gtk 05/13] win-usb-dev: strict comparison of USB devices

2019-03-10 Thread Yuri Benditovich
If on device change the new device has the same bus:address as existing device, win-usb-dev does not emit signal of device change (for example, when due to some reason the 'redirecting' property is set for long time and during this time one of devices is changed). Make device comparison more

[Spice-devel] [spice-gtk 09/13] win-usb-dev: do not allocate memory for hub devices

2019-03-10 Thread Yuri Benditovich
When processing list of USB devices, avoid allocating memory for devices which later will be skipped. Use existing libusb struct first to check whether the device shall be excluded. Signed-off-by: Yuri Benditovich --- src/win-usb-dev.c | 27 --- 1 file changed, 12

[Spice-devel] [spice-gtk 00/13] use persistent libusb_device on Windows

2019-03-10 Thread Yuri Benditovich
This series unifies part of USB redirection code for Windows making it the same as for Linux by using persistent libusb_device also on Windows. Yuri Benditovich (13): usb-redir: replace USE_GUDEV with G_OS_WIN32 usb-redir: remove unused 'subsystem' parameter usb-redir: reuse libusb context