[PATCH 3/3] virtio-gpu: rutabaga: Add options to enable virgl and venus contexts

Weifeng Liu posted 3 patches 5 months, 3 weeks ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
[PATCH 3/3] virtio-gpu: rutabaga: Add options to enable virgl and venus contexts
Posted by Weifeng Liu 5 months, 3 weeks ago
With this change, people will be able to use parameter like the one
below to add start virglrenderer backed virtio-gpu-rutabaga device:

    -device virtio-vga-rutabaga,venus=on,virgl2=on,wsi=surfaceless

Performance being suboptimal though, this would be the first step.

Signed-off-by: Weifeng Liu <weifeng.liu.z@gmail.com>
---
 hw/display/virtio-gpu-rutabaga.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/display/virtio-gpu-rutabaga.c b/hw/display/virtio-gpu-rutabaga.c
index ecb146315a..85bc33af8c 100644
--- a/hw/display/virtio-gpu-rutabaga.c
+++ b/hw/display/virtio-gpu-rutabaga.c
@@ -1203,6 +1203,10 @@ static Property virtio_gpu_rutabaga_properties[] = {
                       RUTABAGA_CAPSET_GFXSTREAM_GLES, false),
     DEFINE_PROP_BIT64("x-gfxstream-composer", VirtIOGPURutabaga, capset_mask,
                       RUTABAGA_CAPSET_GFXSTREAM_COMPOSER, false),
+    DEFINE_PROP_BIT64("venus", VirtIOGPURutabaga, capset_mask,
+                      RUTABAGA_CAPSET_VENUS, false),
+    DEFINE_PROP_BIT64("virgl2", VirtIOGPURutabaga, capset_mask,
+                      RUTABAGA_CAPSET_VIRGL2, false),
     DEFINE_PROP_STRING("wayland-socket-path", VirtIOGPURutabaga,
                        wayland_socket_path),
     DEFINE_PROP_STRING("wsi", VirtIOGPURutabaga, wsi),
-- 
2.45.0