Re: [Spice-devel] [PATCH v9 00/24] Add GStreamer support for video streaming

2016-01-21 Thread Gerd Hoffmann
Hi, > Changes from v7: > * When the client has support for GStreamer video codecs it now > checks the presence of each supported codec before advertising support > for it. ... and the server picks one codec which is supported by both client and gstreamer, with the codec priorities being

Re: [Spice-devel] [PATCH v9 00/24] Add GStreamer support for video streaming

2016-01-21 Thread Gerd Hoffmann
Hi, > > ... and the server picks one codec which is supported by both client and > > gstreamer, with the codec priorities being configurable, is that > > correct? So things keep working if gstreamer happens to have no h264 > > support (due to the patent mess) on either side? > > Yes. [ ... lo

Re: [Spice-devel] [Xen-devel] Developers for virgl 3d windows guest support

2016-01-28 Thread Gerd Hoffmann
Hi, > About virtio-gpu using virgl3d project for 3d hw acceleration support > and is what I mainly watching for its large gpu choice/support, seems > any gpu that have a drm driver in host kernel is supported by virgl, or > I'm wrong? You need a mesa driver too. But, yes, pretty much any mo

Re: [Spice-devel] spice udp support

2016-02-02 Thread Gerd Hoffmann
On Di, 2016-02-02 at 10:24 +0100, Christophe Fergeau wrote: > Hey, > > On Tue, Feb 02, 2016 at 06:10:28PM +0900, Sunny Shin wrote: > > I have a few questions about udp version of spice protocol. > > > > Is there a plan to support udp in spice protocol? > > > > If we support udp, what do we need

Re: [Spice-devel] spice udp support

2016-02-02 Thread Gerd Hoffmann
On Mi, 2016-02-03 at 13:27 +0900, Sunny Shin wrote: > I heard that iptv uses udp multicast, so I thought that performance > might be better if we use udp for video streaming. spice != tv. No multicast here. Oh, and udp/multicast doesn't improve performance, it reduces the bandwidth needed. > W

[Spice-devel] [PATCH 4/8] spice: reset cursor on resize

2016-02-18 Thread Gerd Hoffmann
From: Marc-André Lureau Spice server will clear the cursor on resize. QXL driver reset it after resize, however, virtio and other devices do not. Teach qemu to set it back. Signed-off-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 14 -- 1 file

[Spice-devel] [PATCH 2/8] egl-helpers: add functions for render nodes and dma-buf passing

2016-02-18 Thread Gerd Hoffmann
Adds helpers to open a drm render node and create a opengl context for it. Also add a helper to export a texture as dma-buf. Signed-off-by: Gerd Hoffmann --- include/ui/egl-helpers.h | 13 + ui/egl-helpers.c | 129 +++ 2 files changed

[Spice-devel] [PATCH 3/8] console: track gl_block state in QemuConsole

2016-02-18 Thread Gerd Hoffmann
Keep track of gl_block state (added in bba19b8 console: block rendering until client is done) in QemuConsole and allow to query it. This way we can avoid state inconsistencies in case different code paths make use of this. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + ui

[Spice-devel] [PATCH 5/8] spice: add opengl/virgl/dmabuf support

2016-02-18 Thread Gerd Hoffmann
ote too is planned (by feeding the dma-bufs into gpu-assisted video encoder), but not there yet. gl mode is turned off by default, use "-spice gl=on,$otherargs" to enable it. Signed-off-by: Gerd Hoffmann --- include/ui/spice-display.h | 18 +++ qemu-options.hx| 4

[Spice-devel] [PATCH 7/8] spice/gl: render DisplaySurface via opengl

2016-02-18 Thread Gerd Hoffmann
virtio-gpu driver is loaded) too. This should improve performance even using spice (with gl=on) with non-accelerated stdvga because we stop squeezing all display updates through a unix/tcp socket and basically using a shared memory transport instead. Signed-off-by: Gerd Hoffmann --- include/ui

[Spice-devel] [PATCH 8/8] spice/gl: create dummy primary surface (RfC)

2016-02-18 Thread Gerd Hoffmann
be squashed into the previous patch, or dropped after fixing things on the spice side. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/ui/spice-display.c b/ui/spice-display.c index b222984..54702bb 100644 --- a/ui/spice

[Spice-devel] [PATCH 6/8] spice: tweak debug messages.

2016-02-18 Thread Gerd Hoffmann
Adjust message levels, make messages more verbose. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index 17a71ce..264ecdb 100644 --- a/ui/spice-display.c +++ b/ui/spice

[Spice-devel] [PATCH 1/8] configure: add dma-buf support detection.

2016-02-18 Thread Gerd Hoffmann
Set CONFIG_OPENGL_DMABUF in case both mesa and libepoxy are new enough to have support for dma-buf import/export. Signed-off-by: Gerd Hoffmann --- configure | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0aa249b..0c0472a

[Spice-devel] [PATCH 0/8] spice: add opengl/virgl/dmabuf support

2016-02-18 Thread Gerd Hoffmann
Hi, This patch series adds support for opengl and dma-buf passing to spice. With this in place you can use virtio-gpu in 3d (virgl) mode with spice. Not fully clear whenever the last patch (tagged as RfC) is actually needed. please review, Gerd Gerd Hoffmann (7): configure: add dma-buf

[Spice-devel] [PATCH v2 00/12] spice: add opengl/virgl/dmabuf support

2016-02-19 Thread Gerd Hoffmann
with spice-server. I expect they will go into a separate pull request. Patch #12 will be squashed, either patch #11 or patch #9, depending on the merge ordering, so I kept it separate for now. please review, Gerd Gerd Hoffmann (11): spice: init dcl before registering qxl interface conf

[Spice-devel] [PATCH v2 03/12] egl-helpers: add functions for render nodes and dma-buf passing

2016-02-19 Thread Gerd Hoffmann
Adds helpers to open a drm render node and create a opengl context for it. Also add a helper to export a texture as dma-buf. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/ui/egl-helpers.h | 13 + ui/egl-helpers.c | 129

[Spice-devel] [PATCH v2 02/12] configure: add dma-buf support detection.

2016-02-19 Thread Gerd Hoffmann
Set CONFIG_OPENGL_DMABUF in case both mesa and libepoxy are new enough to have support for dma-buf import/export. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- configure | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure b

[Spice-devel] [PATCH v2 04/12] spice: reset cursor on resize

2016-02-19 Thread Gerd Hoffmann
From: Marc-André Lureau Spice server will clear the cursor on resize. QXL driver reset it after resize, however, virtio and other devices do not. Teach qemu to set it back. Signed-off-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 14 -- 1 file

[Spice-devel] [PATCH v2 12/12] [fixup] spice: qemu_spice_gl_monitor_config + surface

2016-02-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 4 1 file changed, 4 insertions(+) diff --git a/ui/spice-display.c b/ui/spice-display.c index 34e6d51..806851f 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -922,6 +922,10 @@ static void spice_gl_switch

[Spice-devel] [PATCH v2 01/12] spice: init dcl before registering qxl interface

2016-02-19 Thread Gerd Hoffmann
Without this spice might callback into qemu before ssd->dcl.con is initialized, resulting in a segfault due to NULL pointer dereference. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/spice-display.c b/ui/sp

[Spice-devel] [PATCH v2 09/12] spice/gl: render DisplaySurface via opengl

2016-02-19 Thread Gerd Hoffmann
virtio-gpu driver is loaded) too. This should improve performance even using spice (with gl=on) with non-accelerated stdvga because we stop squeezing all display updates through a unix/tcp socket and basically using a shared memory transport instead. Signed-off-by: Gerd Hoffmann --- include/ui

[Spice-devel] [PATCH v2 10/12] spice/gl: create dummy primary surface (RfC)

2016-02-19 Thread Gerd Hoffmann
be squashed into the previous patch, or dropped after fixing things on the spice side. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/ui/spice-display.c b/ui/spice-display.c index 15d7906..96beb02 100644 --- a/ui/spice

[Spice-devel] [PATCH v2 07/12] spice: tweak debug messages.

2016-02-19 Thread Gerd Hoffmann
Adjust message levels, make messages more verbose. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index d6e31e4..242ab5f 100644 --- a/ui/spice-display.c +++ b/ui/spice

[Spice-devel] [PATCH v2 11/12] spice: add & use qemu_spice_gl_monitor_config

2016-02-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/spice-display.h | 1 + ui/spice-display.c | 30 ++ 2 files changed, 31 insertions(+) diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index dd9cf6f..f9388c2 100644 --- a/include/ui/spice

[Spice-devel] [PATCH v2 05/12] spice: add opengl/virgl/dmabuf support

2016-02-19 Thread Gerd Hoffmann
ote too is planned (by feeding the dma-bufs into gpu-assisted video encoder), but not there yet. gl mode is turned off by default, use "-spice gl=on,$otherargs" to enable it. Signed-off-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- include/ui/spice-display.h | 15

[Spice-devel] [PATCH v2 06/12] spice: add unblock timer

2016-02-19 Thread Gerd Hoffmann
Pure debug aid, print a warning in case unblocking doesn't happen within one second. Signed-off-by: Gerd Hoffmann --- include/ui/spice-display.h | 1 + ui/spice-display.c | 16 2 files changed, 17 insertions(+) diff --git a/include/ui/spice-display.h b/inclu

[Spice-devel] [PATCH v2 08/12] console: track gl_block state in QemuConsole

2016-02-19 Thread Gerd Hoffmann
Keep track of gl_block state (added in bba19b8 console: block rendering until client is done) in QemuConsole and allow to query it. This way we can avoid state inconsistencies in case different code paths make use of this. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau

Re: [Spice-devel] [PATCH] vnc: send cursor when a new client is connecting

2016-03-08 Thread Gerd Hoffmann
On Mi, 2016-03-02 at 14:32 +, Frediano Ziglio wrote: > If you have hardware cursor and you are reconnecting the VNC client > you need to send the cursor. Failing to do so make the cursor invisible > till is changed. > > Signed-off-by: Frediano Ziglio added to ui patch queue. thanks, Gerd

Re: [Spice-devel] [PATCH v2 08/10] gtk: require gtk+ 3.16

2016-03-14 Thread Gerd Hoffmann
On Fr, 2016-03-11 at 21:50 +0100, Marc-André Lureau wrote: > 3.16 is the minimal version for GtkGLArea widget, used in following > patches. > - 3.0) GTK_REQUIRED=2.91.3 > + 3.0) GTK_REQUIRED=3.16 That puts the bar pretty high. 3.16 is only one year old and hasn't yet found its way into LTS and

Re: [Spice-devel] [PATCH v2 08/10] gtk: require gtk+ 3.16

2016-03-15 Thread Gerd Hoffmann
On Mo, 2016-03-14 at 12:03 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > On Fr, 2016-03-11 at 21:50 +0100, Marc-André Lureau wrote: > > > 3.16 is the minimal version for GtkGLArea widget, used in following > > > patches. > > > > > - 3.0) GTK_REQUIRED=2.91.3 > > > + 3

Re: [Spice-devel] [PATCH v2 08/10] gtk: require gtk+ 3.16

2016-03-15 Thread Gerd Hoffmann
Hi, > > Dropping wayland isn't an option I think. Is it possible to build > > with/without glarea support (depending on the installed gtk version) and > > hiding that from applications without too much fuss? I.e. with the > > glarea widget being a child of the new gtkstack widget, can we swap

Re: [Spice-devel] [PATCH v2 10/12] spice/gl: create dummy primary surface (RfC)

2016-03-18 Thread Gerd Hoffmann
On Fr, 2016-02-19 at 10:14 +0100, Gerd Hoffmann wrote: > Current spice client expects we create a primary surface, > even if we do display updates using dma-bufs exclusively. > > So just do that to get things going. > > Not fully clear whenever that is intentional or a bug o

Re: [Spice-devel] [PATCH v2 10/12] spice/gl: create dummy primary surface (RfC)

2016-03-21 Thread Gerd Hoffmann
On Fr, 2016-03-18 at 14:45 +0100, Marc-André Lureau wrote: > Hi > > On Fri, Mar 18, 2016 at 2:17 PM, Gerd Hoffmann wrote: > > Ping Marc? Any comment on this? > > > Could you send a rebased series, for the patches that lead to the > issue? Update pushed to https://w

Re: [Spice-devel] [PATCH] drm/qxl: drop prime import/export callbacks

2019-04-08 Thread Gerd Hoffmann
On Tue, Apr 09, 2019 at 02:01:33PM +1000, Dave Airlie wrote: > On Sat, 12 Jan 2019 at 07:13, Dave Airlie wrote: > > > > On Thu, 10 Jan 2019 at 18:17, Gerd Hoffmann wrote: > > > > > > Also set prime_handle_to_fd and prime_fd_to_handle to NULL, > > > so dr

Re: [Spice-devel] [PATCH] drm/qxl: drop prime import/export callbacks

2019-04-09 Thread Gerd Hoffmann
Hi, > > Should we add something like DRM_PRIME_CAP_SAME_DEVICE? > > Yeah I expect we need some sort of same device only capability, so > that dri3 userspace can work. > > If we just fail importing in these cases what happens? userspace just > gets confused, I know we used to print a backtrace

[Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-25 Thread Gerd Hoffmann
8bcb6371f8 Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c | 4 drivers/gpu/drm/qxl/qxl_prime.c | 12 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 578d867a81d5..f33e349c4ec5 100644 --- a/d

Re: [Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-29 Thread Gerd Hoffmann
On Fri, Apr 26, 2019 at 04:21:37PM +0200, Daniel Vetter wrote: > On Fri, Apr 26, 2019 at 7:33 AM Gerd Hoffmann wrote: > > > > This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. > > > > Simliar to commit a0cecc23cfcb Revert "drm/virtio: drop prime > &

Re: [Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-29 Thread Gerd Hoffmann
Hi, > > More useful would be some way to signal this self-reimport capability > > to userspace somehow. See DRM_PRIME_CAP_LOCAL patch. > > Userspace is supposed to test whether import/export works for a > specific combo, not blindly assume it does and then keel over. I think > we need to fix t

[Spice-devel] [PATCH] drm/qxl: drop WARN_ONCE()

2019-05-24 Thread Gerd Hoffmann
There is no good reason to flood the kernel log with a WARN stacktrace just because someone tried to mmap a prime buffer. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_prime.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_prime.c b/drivers/gpu/drm/qxl

Re: [Spice-devel] [PATCH 25/59] drm/qxl: Drop drm_gem_prime_export/import

2019-06-16 Thread Gerd Hoffmann
On Fri, Jun 14, 2019 at 10:35:41PM +0200, Daniel Vetter wrote: > They're the default. > > Aside: Would be really nice to switch the others over to > drm_gem_object_funcs. > > Signed-off-by: Daniel Vetter > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: virtualiz

[Spice-devel] [PATCH 3/6] drm/qxl: use embedded gem object

2019-06-20 Thread Gerd Hoffmann
Drop drm_gem_object from qxl_bo, use the ttm_buffer_object.base instead. Signed-off-by: Gerd Hoffmann --- 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_debugfs.c | 2 +- drivers

[Spice-devel] [PATCH 5/6] drm/ttm: use gem vma_node

2019-06-20 Thread Gerd Hoffmann
Drop vma_node from ttm_buffer_object, use the gem struct (base.vma_node) instead. Signed-off-by: Gerd Hoffmann --- 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 +- drivers/gpu/drm/virtio

[Spice-devel] [PATCH v2 03/18] drm/qxl: use embedded gem object

2019-06-21 Thread Gerd Hoffmann
Drop drm_gem_object from qxl_bo, use the ttm_buffer_object.base instead. Signed-off-by: Gerd Hoffmann --- 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_debugfs.c | 2 +- drivers

[Spice-devel] [PATCH v2 16/18] drm/qxl: switch driver from bo->resv to bo->base.resv

2019-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- 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 013b938986c7..f30460782f05 100644

[Spice-devel] [PATCH v2 08/18] drm/ttm: use gem vma_node

2019-06-21 Thread Gerd Hoffmann
Drop vma_node from ttm_buffer_object, use the gem struct (base.vma_node) instead. Signed-off-by: Gerd Hoffmann --- 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 +- drivers/gpu/drm/virtio

[Spice-devel] [PATCH v3 08/18] drm/ttm: use gem vma_node

2019-06-28 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 v3 03/18] drm/qxl: use embedded gem object

2019-06-28 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

[Spice-devel] [PATCH v3 16/18] drm/qxl: switch driver from bo->resv to bo->base.resv

2019-06-28 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

Re: [Spice-devel] [PATCH v1 09/33] drm/qxl: drop use of drmP.h

2019-06-30 Thread Gerd Hoffmann
On Sun, Jun 30, 2019 at 08:18:58AM +0200, Sam Ravnborg wrote: > Drop use of the deprecated drmP.h header file. > While touching the files divided includes in blocks, > and when needed sort the blocks. > Fix fallout. > > Signed-off-by: Sam Ravnborg > Cc: Dave Airlie >

[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

[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

[Spice-devel] [PATCH] drm/qxl: get vga ioports

2019-08-05 Thread Gerd Hoffmann
ga ports can trigger that too and therefore disturb qxl operation. So aquire the legacy vga ioports from vgaarb to avoid that. Reporducer: Boot kvm guest with both qxl and i915 vgpu, with qxl being first in pci scan order. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c | 11

Re: [Spice-devel] [PATCH] drm/qxl: get vga ioports

2019-08-05 Thread Gerd Hoffmann
Hi, > > + ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); > > + if (ret) { > > + DRM_ERROR("can't get legacy vga ports\n"); > > + goto put_vga; > > I suppose that if this fails it's secondary so should continue. Ah, right, there are secondary qxl cards (without t

[Spice-devel] [PATCH v2] drm/qxl: get vga ioports

2019-08-05 Thread Gerd Hoffmann
de in the first place (Frediano). Cc: Frediano Ziglio Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index b57a37543613..fcb48ac60598

[Spice-devel] [PATCH v5 08/18] drm/ttm: use gem vma_node

2019-08-05 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 v5 03/18] drm/qxl: use embedded gem object

2019-08-05 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

[Spice-devel] [PATCH v5 16/18] drm/qxl: switch driver from bo->resv to bo->base.resv

2019-08-05 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

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

2019-08-05 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

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

2019-08-05 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

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

2019-08-05 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

Re: [Spice-devel] [PATCH] drm/qxl: Use dev_get_drvdata where possible

2019-08-06 Thread Gerd Hoffmann
On Tue, Jul 23, 2019 at 06:40:00PM +0800, Chuhong Yuan wrote: > Instead of using to_pci_dev + pci_get_drvdata, > use dev_get_drvdata to make code simpler. > > Signed-off-by: Chuhong Yuan Queued for drm-misc-next (the bochs patch too). thanks, Gerd

[Spice-devel] [PATCH 3/3] drm/qxl: switch qxl to use the new ttm helpers.

2019-08-06 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 4 +--- drivers/gpu/drm/qxl/qxl_object.h | 5 - drivers/gpu/drm/qxl/qxl_drv.c| 2 +- drivers/gpu/drm/qxl/qxl_dumb.c | 17 - drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +++-- drivers/gpu/drm/qxl/Kconfig

[Spice-devel] [PATCH v2 3/3] drm/qxl: switch qxl to use the new ttm helpers.

2019-08-07 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 4 +--- drivers/gpu/drm/qxl/qxl_object.h | 5 - drivers/gpu/drm/qxl/qxl_drv.c| 2 +- drivers/gpu/drm/qxl/qxl_dumb.c | 17 - drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +++-- drivers/gpu/drm/qxl/Kconfig

[Spice-devel] [PATCH v3 8/8] gem/qxl: use drm_gem_ttm_bo_driver_verify_access()

2019-08-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_ttm.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 3a24145dd516..bcf48b062a85 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu

[Spice-devel] [PATCH v3 5/8] drm/qxl: switch qxl to the new gem_ttm_bo_device_init()

2019-08-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 4 +--- drivers/gpu/drm/qxl/qxl_object.h | 5 - drivers/gpu/drm/qxl/qxl_drv.c| 1 - drivers/gpu/drm/qxl/qxl_dumb.c | 17 - drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +++-- drivers/gpu/drm/qxl/qxl_ttm.c

[Spice-devel] [PATCH v4 15/17] drm/qxl: switch qxl to drm_gem_object_funcs->mmap codepath

2019-08-08 Thread Gerd Hoffmann
... using the use drm_gem_ttm_mmap() helper function. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 1 - drivers/gpu/drm/qxl/qxl_drv.c| 2 +- drivers/gpu/drm/qxl/qxl_object.c | 1 + drivers/gpu/drm/qxl/qxl_ttm.c| 16 4 files changed, 2

[Spice-devel] [PATCH v4 13/17] drm/qxl: use drm_gem_object_funcs

2019-08-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c| 8 drivers/gpu/drm/qxl/qxl_object.c | 12 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 12cf85a06bed..38467478c7b2

[Spice-devel] [PATCH v4 04/17] drm/qxl: switch qxl to the new gem_ttm_bo_device_init()

2019-08-08 Thread Gerd Hoffmann
This allows to drop qxl_mode_dumb_mmap() and qxl_bo_mmap_offset(), the default gem function works just fine. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 4 +--- drivers/gpu/drm/qxl/qxl_object.h | 5 - drivers/gpu/drm/qxl/qxl_drv.c| 1 - drivers/gpu/drm/qxl

[Spice-devel] [PATCH v4 17/17] drm/qxl: use DEFINE_DRM_GEM_FOPS()

2019-08-08 Thread Gerd Hoffmann
We have no qxl-specific fops any more. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 2fb1641c817e..4853082ba924 100644 --- a/drivers

[Spice-devel] [PATCH v4 16/17] drm/qxl: drop verify_access

2019-08-08 Thread Gerd Hoffmann
Not needed any more. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_ttm.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index dbaed0e67c21..d1d8fe6e1e93 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers

[Spice-devel] [PATCH v4 14/17] drm/qxl: drop qxl_ttm_fault

2019-08-08 Thread Gerd Hoffmann
Not sure what this hook is supposed to do. vmf->vma->vm_private_data should never be NULL, so the extra check in qxl_ttm_fault should have no effect. Drop it. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_ttm.c | 27 +-- 1 file changed, 1 insertion(

Re: [Spice-devel] [Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node

2019-08-13 Thread Gerd Hoffmann
ng the order doesn't look hard. Patch attached (untested, have no test hardware). But maybe I missed some detail ... The other patch attached works around the issue with a flag, to avoid drm_vma_node_reset() being called twice. cheers, Gerd >From af43f933533140e2df58176a68df0c60ba08227

Re: [Spice-devel] [Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node

2019-08-14 Thread Gerd Hoffmann
hat when necessary the GEM > object can be initialized in between. I think that's slightly more > flexible and easier to understand than a boolean flag. Yes, that should work too. Acked-by: Gerd Hoffmann cheers, Gerd ___ Spice-devel mailing l

Re: [Spice-devel] [PATCH] drm/qxl: fix a memory leak bug

2019-08-19 Thread Gerd Hoffmann
On Mon, Aug 19, 2019 at 01:08:18PM -0500, Wenwen Wang wrote: > In qxl_bo_create(), the temporary 'bo' is allocated through kzalloc(). > However, it is not deallocated in the following execution if ttm_bo_init() > fails, leading to a memory leak bug. To fix this issue, free 'bo' before > returning t

[Spice-devel] [PATCH 2/3] drm: drop resource_id parameter from drm_fb_helper_remove_conflicting_pci_framebuffers

2019-08-22 Thread Gerd Hoffmann
Not needed any more for remove_conflicting_pci_framebuffers calls. Signed-off-by: Gerd Hoffmann --- include/drm/drm_fb_helper.h | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/bochs/bochs_drv.c | 2 +- drivers/gpu/drm/cirrus/cirrus.c | 2

[Spice-devel] [PATCH 5/5] drm/qxl: use drm_gem_ttm_print_info

2019-09-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 1 + drivers/gpu/drm/qxl/qxl_object.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 9e034c5fa87d..d4051409ce64 100644 --- a/drivers/gpu/drm/qxl

[Spice-devel] [PATCH 4/5] drm/qxl: use drm_gem_object_funcs callbacks

2019-09-02 Thread Gerd Hoffmann
Switch qxl to use drm_gem_object_funcs callbacks instead of drm_driver callbacks. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c| 8 drivers/gpu/drm/qxl/qxl_object.c | 12 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm

Re: [Spice-devel] [PATCH 4/5] drm/qxl: use drm_gem_object_funcs callbacks

2019-09-02 Thread Gerd Hoffmann
On Mon, Sep 02, 2019 at 04:34:49PM +0200, Thomas Zimmermann wrote: > This patch seems unrelated. Well, patch 5/5 depends on it because it hooks the drm_gem_ttm_print_info helper into the new qxl_object_funcs added by this patch. > Am 02.09.19 um 14:41 schrieb Gerd Hoffmann: > > Switc

[Spice-devel] [PATCH v2 6/6] drm/qxl: use drm_gem_ttm_print_info

2019-09-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.h| 1 + drivers/gpu/drm/qxl/qxl_object.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 9e034c5fa87d..d4051409ce64 100644 --- a

[Spice-devel] [PATCH v2 5/6] drm/qxl: use drm_gem_object_funcs callbacks

2019-09-03 Thread Gerd Hoffmann
Switch qxl to use drm_gem_object_funcs callbacks instead of drm_driver callbacks. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.c| 8 drivers/gpu/drm/qxl/qxl_object.c | 12 2 files changed, 12 insertions(+), 8 deletions

[Spice-devel] [PATCH v3 6/7] drm/qxl: use drm_gem_ttm_print_info

2019-09-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.h| 1 + drivers/gpu/drm/qxl/qxl_object.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 9e034c5fa87d..d4051409ce64 100644 --- a

[Spice-devel] [PATCH v3 5/7] drm/qxl: use drm_gem_object_funcs callbacks

2019-09-03 Thread Gerd Hoffmann
Switch qxl to use drm_gem_object_funcs callbacks instead of drm_driver callbacks. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.c| 8 drivers/gpu/drm/qxl/qxl_object.c | 12 2 files changed, 12 insertions(+), 8 deletions

[Spice-devel] [PATCH 6/8] drm/qxl: switch to gem vma offset manager

2019-09-05 Thread Gerd Hoffmann
Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it instead of its own embedded struct. This makes some gem functions (specifically drm_gem_object_lookup) work on ttm objects. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- 1 file changed, 1 insertion

Re: [Spice-devel] Xorg indefinitely hangs in kernelspace

2019-09-05 Thread Gerd Hoffmann
On Tue, Aug 06, 2019 at 09:00:10PM +0300, Jaak Ristioja wrote: > Hello! > > I'm writing to report a crash in the QXL / DRM code in the Linux kernel. > I originally filed the issue on LaunchPad and more details can be found > there, although I doubt whether these details are useful. Any change wit

[Spice-devel] [PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer

2019-09-05 Thread Gerd Hoffmann
_vma_manager is used. All callers are updated to pass NULL, so the behavior doesn't change. Signed-off-by: Gerd Hoffmann --- include/drm/ttm/ttm_bo_driver.h | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu/drm/drm_vram_mm_helper.c| 1 + drivers/gpu/drm/no

Re: [Spice-devel] Xorg indefinitely hangs in kernelspace

2019-09-08 Thread Gerd Hoffmann
Hi, --verbose please. Do you see the same hang? Does the patch fix it? > --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c > +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c > @@ -97,8 +97,9 @@ int ttm_eu_reserve_buffers(struct ww_acq > struct list_head *dups, bool del_lru) [

Re: [Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions

2019-09-29 Thread Gerd Hoffmann
On Fri, Sep 27, 2019 at 03:24:57PM +0200, Christian König wrote: > The ttm_mem_io_* functions are actually internal to TTM and shouldn't be > used in a driver. > > Instead call the qxl_ttm_io_mem_reserve() function directly. Reviewed-

Re: [Spice-devel] [PATCH 2/2] drm/ttm: stop exporting ttm_mem_io_* functions

2019-09-29 Thread Gerd Hoffmann
On Fri, Sep 27, 2019 at 03:24:58PM +0200, Christian König wrote: > Those are not supposed to be used by drivers. > > Signed-off-by: Christian König Acked-by: Gerd Hoffmann ___ Spice-devel mailing list Spice-devel@lists.freedesktop.

Re: [Spice-devel] [PATCH -next] drm/qxl: Fix randbuild error

2019-10-17 Thread Gerd Hoffmann
On Tue, Oct 08, 2019 at 10:40:54AM +0800, YueHaibing wrote: > If DEM_QXL is y and DRM_TTM_HELPER is m, building fails: > > drivers/gpu/drm/qxl/qxl_object.o: undefined reference to > `drm_gem_ttm_print_info' > > Select DRM_TTM_HELPER to fix this. Queued up for drm-misc-next. thanks, Gerd ___

[Spice-devel] [PATCH 1/5] drm/qxl: drop qxl_ttm_fault

2019-10-17 Thread Gerd Hoffmann
Not sure what this hook is supposed to do. vmf->vma->vm_private_data should never be NULL, so the extra check in qxl_ttm_fault should have no effect. Drop it. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_ttm.c | 27 +-- 1 file changed, 1 insertion(

spice-devel@lists.freedesktop.org

2019-10-17 Thread Gerd Hoffmann
Wire up the new drm_gem_ttm_mmap() helper function. Use generic drm_gem_mmap() and remove qxl_mmap(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 1 - drivers/gpu/drm/qxl/qxl_drv.c| 2 +- drivers/gpu/drm/qxl/qxl_object.c | 1 + drivers/gpu/drm/qxl/qxl_ttm.c

[Spice-devel] [PATCH 5/5] drm/qxl: allocate small objects top-down

2019-10-17 Thread Gerd Hoffmann
qxl uses small buffer objects for qxl commands. Allocate them top-down to reduce fragmentation. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_object.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl

[Spice-devel] [PATCH 4/5] drm/qxl: use DEFINE_DRM_GEM_FOPS()

2019-10-17 Thread Gerd Hoffmann
We have no qxl-specific fops any more. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 65464630ac98..1d601f57a6ba 100644 --- a/drivers

[Spice-devel] [PATCH 3/5] drm/qxl: drop verify_access

2019-10-17 Thread Gerd Hoffmann
Not needed any more. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_ttm.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 629ac8e77a21..54cc5a5b607e 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers

Re: [Spice-devel] [PATCH] drm/qxl: Complete exception handling in qxl_device_init()

2019-11-29 Thread Gerd Hoffmann
On Thu, Nov 07, 2019 at 06:18:14PM +0100, Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 7 Nov 2019 18:05:08 +0100 > > A coccicheck run provided information like the following. > > drivers/gpu/drm/qxl/qxl_kms.c:295:1-7: ERROR: missing iounmap; > ioremap on line 178 and execution via c

Re: [Spice-devel] [PATCH] drm/qxl: remove unnecessary BUG_ON check for handle

2019-12-06 Thread Gerd Hoffmann
On Thu, Dec 05, 2019 at 05:42:31PM -0600, Aditya Pakki wrote: > In qxl_gem_object_create_with_handle(), handle's memory is not > allocated on the heap. Checking for failure of handle via BUG_ON > is unnecessary. This patch eliminates the check. The check makes sure the caller doesn't pass in handl

Re: [Spice-devel] [PATCH v2 1/1] virtio-video: Add virtio video device specification

2019-12-18 Thread Gerd Hoffmann
Hi, > +The device MUST mark the last buffer with the > +VIRTIO_VIDEO_BUFFER_F_EOS flag to denote completion of the drain > +sequence. No, that would build a race condition into the protocol. The device could complete the last buffer after the driver has sent the drain command but before the de

Re: [Spice-devel] [virtio-dev] Re: [PATCH v2 1/1] virtio-video: Add virtio video device specification

2019-12-19 Thread Gerd Hoffmann
On Wed, Dec 18, 2019 at 11:08:37PM +0900, Tomasz Figa wrote: > On Wed, Dec 18, 2019 at 10:40 PM Gerd Hoffmann wrote: > > > > Hi, > > > > > +The device MUST mark the last buffer with the > > > +VIRTIO_VIDEO_BUFFER_F_EOS flag to denote completion of the

Re: [Spice-devel] [virtio-dev] Re: [PATCH v2 1/1] virtio-video: Add virtio video device specification

2019-12-19 Thread Gerd Hoffmann
Hi, > > Not clearly defined in the spec: When is the decoder supposed to send > > the response for a queue request? When it finished decoding (i.e. frame > > is ready for playback), or when it doesn't need the buffer any more for > > decoding (i.e. buffer can be re-queued or pages can be relea

  1   2   3   4   5   6   7   8   9   10   >