All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/18] virgl: use a seperate rendering thread
@ 2016-09-04 22:20 Marc-André Lureau
  2016-09-04 22:20 ` [Qemu-devel] [PATCH 01/18] console: skip same-size resize Marc-André Lureau
                   ` (20 more replies)
  0 siblings, 21 replies; 23+ messages in thread
From: Marc-André Lureau @ 2016-09-04 22:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: airlied, kraxel, Marc-André Lureau

Hi,

A while ago, Dave Airlie started implementing a seperate thread for
virgl (although it didn't work for me and was very much in wip
state). I fixed the code so I could test it, and moved it to use qemu
iothread/aio loops, inspired by the dataplane code in the virtio block
devices.

The benchmarks are quite encouraging, since I get from +-25% for
xonotic up to +-100% for glmark. (fwiw, vhost-user-gpu had similar
results too). Finally, I tried to make it acceptable for upstream.

Note that I only manage to get the rendering thread working with
spice/egl, for some reason the GL context creation fails with other
backends (even with gtk/egl, perhaps because having context surfaces
brings additional multi-threading limitations to opengl). I added a
dpy_gl_ctx_is_mt_safe() check for that reason.

Dave Airlie (2):
  virtio-gpu: start splitting scanout/resource flushing
  virtio-gpu: start introducing a lock around the display info

Marc-André Lureau (16):
  console: skip same-size resize
  console: add dpy_gl_ctx_is_mt_safe
  virtio-gpu: add "iothread" property
  virtio-gpu: create a thread context
  gl: allow to keep current context in ctx-create
  gl: bind GL api before context creation
  bitmap: add a simple foreach util
  virtio-blk: use bitmap_foreach
  virtio-gpu: use a bh for cursor modifications
  virtio-gpu: save a pointer from virtio_gpu_ctrl_command
  virtio-gpu: add a virgl data-plane
  virtio-gpu: batch virtio_notify when using a data-plane
  virtio-gpu: dispatch to main thread for scanout & flush
  virtio-gpu: use virgl thread sync with the data-plane
  virtio-gpu: schedule a bh to unblock the data-plane
  virtio-gpu: start/stop the data-plane

 hw/block/dataplane/virtio-blk.c |  29 ++---
 hw/display/virtio-gpu-3d.c      | 252 ++++++++++++++++++++++++++++++++++----
 hw/display/virtio-gpu-pci.c     |   2 +
 hw/display/virtio-gpu.c         | 261 ++++++++++++++++++++++++++++++++++++++--
 hw/display/virtio-vga.c         |  13 ++
 ui/console.c                    |  22 +++-
 ui/egl-context.c                |  27 +++--
 ui/gtk-egl.c                    |   9 +-
 ui/gtk-gl-area.c                |   3 +-
 ui/sdl2-gl.c                    |   7 +-
 ui/spice-display.c              |  11 +-
 include/hw/virtio/virtio-gpu.h  |  55 ++++++++-
 include/qemu/bitmap.h           |  23 ++++
 include/ui/console.h            |  11 +-
 include/ui/gtk.h                |   6 +-
 include/ui/sdl2.h               |   3 +-
 16 files changed, 652 insertions(+), 82 deletions(-)

-- 
2.9.0

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2016-09-08  6:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-04 22:20 [Qemu-devel] [PATCH 00/18] virgl: use a seperate rendering thread Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 01/18] console: skip same-size resize Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 02/18] console: add dpy_gl_ctx_is_mt_safe Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 03/18] virtio-gpu: add "iothread" property Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 04/18] virtio-gpu: start splitting scanout/resource flushing Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 05/18] virtio-gpu: start introducing a lock around the display info Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 06/18] virtio-gpu: create a thread context Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 07/18] gl: allow to keep current context in ctx-create Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 08/18] gl: bind GL api before context creation Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 09/18] bitmap: add a simple foreach util Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 10/18] virtio-blk: use bitmap_foreach Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 11/18] virtio-gpu: use a bh for cursor modifications Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 12/18] virtio-gpu: save a pointer from virtio_gpu_ctrl_command Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 13/18] virtio-gpu: add a virgl data-plane Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 14/18] virtio-gpu: batch virtio_notify when using a data-plane Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 15/18] virtio-gpu: dispatch to main thread for scanout & flush Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 16/18] virtio-gpu: use virgl thread sync with the data-plane Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 17/18] virtio-gpu: schedule a bh to unblock " Marc-André Lureau
2016-09-04 22:20 ` [Qemu-devel] [PATCH 18/18] virtio-gpu: start/stop " Marc-André Lureau
2016-09-04 22:46 ` [Qemu-devel] [PATCH 00/18] virgl: use a seperate rendering thread no-reply
2016-09-04 22:48 ` no-reply
2016-09-08  6:01 ` Gerd Hoffmann
2016-09-08  6:38   ` Marc-André Lureau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.