mbox series

[v5,0/9] gfxstream + rutabaga_gfx

Message ID 20230815003526.631-1-gurchetansingh@chromium.org (mailing list archive)
Headers show
Series gfxstream + rutabaga_gfx | expand

Message

Gurchetan Singh Aug. 15, 2023, 12:35 a.m. UTC
From: Gurchetan Singh <gurchetansingh@google.com>

Prior versions:

v4:
https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg01566.html

v3:
https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg00565.html

v2:
https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg05801.html

v1:
https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg02341.html

RFC:
https://patchew.org/QEMU/20230421011223.718-1-gurchetansingh@chromium.org/

Changes since v4:
- Incorporated review feedback

There area a few things I didn't fully incorporate and here are reasons
why:

"Perhaps it's better to add another parameter to CHECK() and pass values
other than VIRTIO_GPU_RESP_ERR_UNSPEC where appropriate although I doubt
anyone cares" - Akihiko Odaki

The rutabaga_debug_cb will give a more detailed description of the error
in most cases anyways, so I didn't change the macro for simplicity.

"I think it's better to make a hard error if the user requested
RUTABAGA_CAPSET_CROSS_DOMAIN but the default socket path does not fit in
wayland_socket_path." - Akihiko Odaki

It is possible to use cross-domain without enabling Wayland, for guest
swapchain allocation [a] which often needs special handling.  We might
want to use this capability on MacOS/Windows in the future without
Wayland, hence we shouldn't hard error if the default wayland socket
isn't found.

[a] https://android.googlesource.com/platform/external/minigbm/+/refs/heads/main/virtgpu_cross_domain.c

"Originally, Antonio Caggiano implemented the virgl_cmd_resource_xxx_blob
in virtio-gpu-virgl.c. Could you have a way to re-use that kinds of
functions in your implemenation?" - Ray Huang

Those patches haven't landed yet.  Once a blob-enabled series does land, I
do think makes sense to factor out generic helpers where-ever possible.

Otherwise, all other suggestions are in v5.

How to build both rutabaga and gfxstream guest/host libs:

https://crosvm.dev/book/appendix/rutabaga_gfx.html

Branch containing this patch series:

https://gitlab.freedesktop.org/gurchetansingh/qemu-gfxstream/-/commits/qemu-gfxstream-v5

Antonio Caggiano (2):
  virtio-gpu: CONTEXT_INIT feature
  virtio-gpu: blob prep

Dr. David Alan Gilbert (1):
  virtio: Add shared memory capability

Gerd Hoffmann (1):
  virtio-gpu: hostmem

Gurchetan Singh (5):
  gfxstream + rutabaga prep: added need defintions, fields, and options
  gfxstream + rutabaga: add initial support for gfxstream
  gfxstream + rutabaga: meson support
  gfxstream + rutabaga: enable rutabaga
  docs/system: add basic virtio-gpu documentation

 docs/system/device-emulation.rst     |    1 +
 docs/system/devices/virtio-gpu.rst   |  113 +++
 hw/display/meson.build               |   22 +
 hw/display/virtio-gpu-base.c         |    6 +-
 hw/display/virtio-gpu-pci-rutabaga.c |   48 ++
 hw/display/virtio-gpu-pci.c          |   14 +
 hw/display/virtio-gpu-rutabaga.c     | 1114 ++++++++++++++++++++++++++
 hw/display/virtio-gpu.c              |   16 +-
 hw/display/virtio-vga-rutabaga.c     |   51 ++
 hw/display/virtio-vga.c              |   33 +-
 hw/virtio/virtio-pci.c               |   18 +
 include/hw/virtio/virtio-gpu-bswap.h |   18 +
 include/hw/virtio/virtio-gpu.h       |   41 +
 include/hw/virtio/virtio-pci.h       |    4 +
 meson.build                          |    7 +
 meson_options.txt                    |    2 +
 scripts/meson-buildoptions.sh        |    3 +
 softmmu/qdev-monitor.c               |    3 +
 softmmu/vl.c                         |    1 +
 19 files changed, 1496 insertions(+), 19 deletions(-)
 create mode 100644 docs/system/devices/virtio-gpu.rst
 create mode 100644 hw/display/virtio-gpu-pci-rutabaga.c
 create mode 100644 hw/display/virtio-gpu-rutabaga.c
 create mode 100644 hw/display/virtio-vga-rutabaga.c