Re: [Spice-devel] [spice-gtk] clipboard: don't request targets without owner on X11

2019-01-27 Thread Frediano Ziglio
> > On X11, if the owner in GdkEventOwnerChange is set to NULL, > it means there's no data in the clipboard, so it's pointless to > request targets as the request will fail anyway. > Surely Victor or other people knows more than me in this respect. > On Wayland, owner is always NULL, so don't d

[Spice-devel] [spice-gtk] clipboard: don't request targets without owner on X11

2019-01-27 Thread Jakub Janků
On X11, if the owner in GdkEventOwnerChange is set to NULL, it means there's no data in the clipboard, so it's pointless to request targets as the request will fail anyway. On Wayland, owner is always NULL, so don't do anything there. Signed-off-by: Jakub Janků --- src/spice-gtk-session.c | 8 +

Re: [Spice-devel] [PATCH v3 14/23] drm/qxl: cover all crtcs in shadow bo.

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > The qxl device supports only a single active framebuffer ("primary > surface" in spice terminology). In multihead configurations are handled > by defining rectangles within the primary surface for each head/crtc. > > Userspace which uses the qxl ioct

Re: [Spice-devel] [PATCH v3 20/23] drm/qxl: add mode/framebuffer check functions

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add a helper functions to check video modes. Also add a helper to check > framebuffer buffer objects, using the former for consistency. That way > we should not fail in qxl_primary_atomic_check() because video modes > which are too big will not be ad

Re: [Spice-devel] [PATCH v3 02/23] drm/qxl: drop unused qxl_fb_virtual_address

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.19, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v3 08/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > The shadow bo is used as qxl surface, so allocate it as > QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in > PRIV ttm domain then, so this reduces VRAM memory pressure. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes

Re: [Spice-devel] [PATCH v3 06/23] drm/qxl: use separate offset spaces for the two slots / ttm memory types.

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Without that ttm offsets are not unique, they can refer to objects > in both VRAM and PRIV memory (aka main and surfaces slot). > > One of those "why things didn't blow up without this" moments. > Probably offset conflicts are rare enough by pure luck

Re: [Spice-devel] [PATCH 01/26] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-27 Thread Sam Ravnborg
Hi Daniel. On Thu, Jan 24, 2019 at 05:58:06PM +0100, Daniel Vetter wrote: > If a non-legacy driver calls these it's valid to assume there is > interrupt support. The flag is really only needed for legacy drivers. > > Also remove all the flag usage from non-legacy drivers. > > Signed-off-by: Dani

Re: [Spice-devel] [PATCH v3 16/23] drm/qxl: implement prime kmap/kunmap

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Generic fbdev emulation needs this. Also: We must keep track of the > number of mappings now, so we don't unmap early in case two users want a > kmap of the same bo. Add a sanity check to destroy callback to make > sure kmap/kunmap is balanced. > >

Re: [Spice-devel] [PATCH v3 13/23] drm/qxl: use shadow bo directly

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Pass the shadow bo to qxl_io_create_primary() instead of expecting > qxl_io_create_primary to check bo->shadow. Set is_primary flag on the > shadow bo. Move the is_primary tracking into qxl_io_create_primary() > and qxl_io_destroy_primary() functions

Re: [Spice-devel] [PATCH v3 17/23] drm/qxl: use generic fbdev emulation

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Switch qxl over to the new generic fbdev emulation. > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 7 --- > drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ > 2 files changed, 2 insertions(+), 7 deletions(-) > > diff --gi

Re: [Spice-devel] [PATCH v3 19/23] drm/qxl: implement qxl_gem_prime_(un)pin

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v3 15/23] drm/qxl: use qxl_num_crtc directly

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > qdev->monitors_config->max_allowed is effectively set by the > qxl.num_heads module parameter, stored in the qxl_num_crtc variable. > Lets get rid of the indirection and use the variable qxl_num_crtc > directly. The kernel doesn't need to dereference

Re: [Spice-devel] [PATCH v3 09/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > dumb buffers are used as qxl surfaces, so allocate them as > QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in > PRIV ttm domain then, so this reduces VRAM memory pressure. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes _

Re: [Spice-devel] [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-27 Thread Noralf Trønnes
Den 25.01.2019 19.10, skrev Sam Ravnborg: > Hi Noralf. > >>> Lovely diffstat, thanks to the new generic fbdev emulation. >>> >>> drm/qxl/Makefile |2 >>> drm/qxl/qxl_draw.c | 232 >>> drm/qxl/qxl_drv.h | 21 --- >>> drm/qxl/qxl_fb.c | 300 >

[Spice-devel] [PATCH 01/26] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-27 Thread Daniel Vetter
If a non-legacy driver calls these it's valid to assume there is interrupt support. The flag is really only needed for legacy drivers. Also remove all the flag usage from non-legacy drivers. Signed-off-by: Daniel Vetter Cc: linux-arm-ker...@lists.infradead.org Cc: intel-...@lists.freedesktop.org

Re: [Spice-devel] [PATCH v3 07/23] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > qxl surfaces (used for framebuffers and gem objects) can live in both > VRAM and PRIV ttm domains. Update placement setup to include both. > Put PRIV first in the list so it is preferred, so VRAM will have more > room for objects which must be allocat

Re: [Spice-devel] [PATCH v3 21/23] drm/qxl: add qxl_add_mode helper function

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add a helper function to add custom video modes to a connector. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists

Re: [Spice-devel] [PATCH v3 05/23] drm/qxl: drop unused fields from struct qxl_device

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > slot_id_bits and slot_gen_bits can be read directly from qxlrom instead. > va_slot_mask is never used anywhere. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Spice-devel mailing list

Re: [Spice-devel] [PATCH v3 12/23] drm/qxl: track primary bo

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Track which bo is used as primary surface. With that in place we don't > need the primary_created flag any more, we can just check the primary bo > pointer instead. > > Also verify we don't already have a primary surface in > qxl_io_create_primary().

Re: [Spice-devel] [PATCH v3 11/23] drm/qxl: drop unused offset parameter from qxl_io_create_primary()

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v3 10/23] drm/qxl: move qxl_primary_apply_cursor to correct place

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > The cursor must be set again after creating the primary surface. > Also drop the error message. > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 10 +++--- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff -

Re: [Spice-devel] [PATCH v3 01/23] drm/qxl: drop ttm_mem_reg arg from qxl_hw_surface_alloc()

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.19, skrev Gerd Hoffmann: > Not used, is always NULL. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spic

Re: [Spice-devel] [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Lovely diffstat, thanks to the new generic fbdev emulation. > > drm/qxl/Makefile |2 > drm/qxl/qxl_draw.c | 232 > drm/qxl/qxl_drv.h | 21 --- > drm/qxl/qxl_fb.c | 300 > -

Re: [Spice-devel] [PATCH 01/26] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-27 Thread Emil Velikov
On Thu, 24 Jan 2019 at 16:58, Daniel Vetter wrote: > > If a non-legacy driver calls these it's valid to assume there is > interrupt support. The flag is really only needed for legacy drivers. ... legacy drivers which issue the IRQ via the DRM_IOCTL_CONTROL legacy IOCTL. At a later stage, we migh

Re: [Spice-devel] [PATCH v3 04/23] drm/qxl: change the way slot is detected

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > From: Frediano Ziglio > > Instead of relaying on surface type use the actual placement. > This allow to have different placement for a single type of > surface. > > Signed-off-by: Frediano Ziglio > > [ kraxel: rebased, adapted to upstream changes

Re: [Spice-devel] [PATCH v3 03/23] drm/qxl: simplify slot management

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Drop pointless indirection, remove the mem_slots array and index > variables, drop dynamic allocation. Store memslots in qxl_device > instead. > > Signed-off-by: Gerd Hoffmann > --- Looks sane: Acked-by: Noralf Trønnes ___

[Spice-devel] [PATCH 19/26] drm/qxl: Use drm_fb_helper_fill_info

2019-01-27 Thread Daniel Vetter
This should not result in any changes. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_fb.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a

Re: [Spice-devel] [PATCH v3 22/23] drm/qxl: use kernel mode db

2019-01-27 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add all standard modes from the kernel's video mode data base. > Keep a few non-standard modes in the qxl mode list. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Spice-devel mailing

Re: [Spice-devel] [spice-gtk v2] gtk-session: clipboard request: notify agent on failure

2019-01-27 Thread Jakub Janku
Hi, On Wed, Jan 16, 2019 at 10:11 AM Victor Toso wrote: > > From: Victor Toso > > Similar to 172c521271a3d - if we don't, the agent might be waiting for > data till some timeout happens in the system, blocking copy-paste > feature and possibly freezing applications. > > A way to reproduce is cop

[Spice-devel] [PATCH v2 1/2] gst: add helper for runtime check on gst plugin version

2019-01-27 Thread Victor Toso
From: Victor Toso This patch factor out the runtime check for pulsesrc plugin version in order to be used in the follow up patch by channel-display-gst.c This code can be shared between spice-gstaudio.c and channel-display-gst.c so it was moved to spice-util.c tests/Makefile.am has been updated

[Spice-devel] [PATCH v2 2/2] display-gst: change compile to runtime check of vaapisink element

2019-01-27 Thread Victor Toso
From: Victor Toso Runtime check is better fit to enable/disable vaapisink. For that, use spice_check_gst_plugin_version() from previous commit. Signed-off-by: Victor Toso --- src/channel-display-gst.c | 37 + 1 file changed, 17 insertions(+), 20 deletions(-)

Re: [Spice-devel] [PATCH spice-server] fixup! Send the graphics device info to the vd_agent

2019-01-27 Thread Victor Toso
Hi, On Sun, Jan 27, 2019 at 12:57:49PM +, Frediano Ziglio wrote: > --- > configure.ac | 2 +- > meson.build | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 903993a1..fa79af7f 100644 > --- a/configure.ac > +++ b/configure.ac > @

Re: [Spice-devel] [PATCH v1 2/2] display-gst: change compile to runtime check of vaapisink element

2019-01-27 Thread Victor Toso
Hi, On Sun, Jan 27, 2019 at 06:25:18AM -0500, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > Runtime check is better fit to enable/disable vaapisink. For that, use > > spice_check_gst_plugin_version() from previous commit. > > > > Signed-off-by: Victor Toso > > --- > > src/channel-

Re: [Spice-devel] [PATCH v1 1/2] gst: add helper for runtime check on gst plugin version

2019-01-27 Thread Victor Toso
Hi, On Sat, Jan 26, 2019 at 10:02:02AM -0500, Frediano Ziglio wrote: > > From: Victor Toso > > > > This patch factor out the runtime check for pulsesrc plugin version in > > order to be used in the follow up patch by channel-display-gst.c > > > > This code can be shared between spice-gstaudio.c

[Spice-devel] [PATCH spice-server] fixup! Send the graphics device info to the vd_agent

2019-01-27 Thread Frediano Ziglio
--- configure.ac | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 903993a1..fa79af7f 100644 --- a/configure.ac +++ b/configure.ac @@ -161,7 +161,7 @@ AS_IF([test x"$have_smartcard" = "xyes"], [ AS_VAR_APPEND([SPICE_R

Re: [Spice-devel] [PATCH v1 2/2] display-gst: change compile to runtime check of vaapisink element

2019-01-27 Thread Frediano Ziglio
> > From: Victor Toso > > Runtime check is better fit to enable/disable vaapisink. For that, use > spice_check_gst_plugin_version() from previous commit. > > Signed-off-by: Victor Toso > --- > src/channel-display-gst.c | 25 +++-- > 1 file changed, 11 insertions(+), 14 del