diff mbox series

[QEMU,v5,12/13] virtio-gpu: Initialize Venus

Message ID 20230915111130.24064-13-ray.huang@amd.com (mailing list archive)
State New, archived
Headers show
Series Support blob memory and venus on qemu | expand

Commit Message

Huang Rui Sept. 15, 2023, 11:11 a.m. UTC
From: Antonio Caggiano <antonio.caggiano@collabora.com>

Request Venus when initializing VirGL.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
---

V4 -> V5:
    - Add meson check to make sure unstable APIs defined from 0.9.0. (Antonio)

 hw/display/virtio-gpu-virgl.c | 4 ++++
 meson.build                   | 5 +++++
 2 files changed, 9 insertions(+)

Comments

Dmitry Osipenko Oct. 10, 2023, 12:10 p.m. UTC | #1
On 9/15/23 14:11, Huang Rui wrote:
> +  if virgl.version().version_compare('>= 0.9.0') and virgl.version().version_compare('< 1.0.0')
> +    message('Enabling virglrenderer unstable APIs')
> +    virgl = declare_dependency(compile_args: '-DVIRGL_RENDERER_UNSTABLE_APIS',
> +                               dependencies: virgl)
> +  endif

All the required APIs has been stabilized in virglrenderer 1.0, we
shouldn't use the VIRGL_RENDERER_UNSTABLE_APIS anymore. The unstable
APIs were used for development purposes and shouldn't present in the
final version.

Please remove the VIRGL_RENDERER_UNSTABLE_APIS in v6.
diff mbox series

Patch

diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 7f95490e90..39c04d730c 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -887,6 +887,10 @@  int virtio_gpu_virgl_init(VirtIOGPU *g)
     }
 #endif
 
+#ifdef VIRGL_RENDERER_VENUS
+    flags |= VIRGL_RENDERER_VENUS;
+#endif
+
     ret = virgl_renderer_init(g, flags, &virtio_gpu_3d_cbs);
     if (ret != 0) {
         error_report("virgl could not be initialized: %d", ret);
diff --git a/meson.build b/meson.build
index f7b744ab82..e4004d05b1 100644
--- a/meson.build
+++ b/meson.build
@@ -1076,6 +1076,11 @@  if not get_option('virglrenderer').auto() or have_system or have_vhost_user_gpu
                        cc.has_function('virgl_renderer_resource_create_blob',
                                        prefix: '#include <virglrenderer.h>',
                                        dependencies: virgl))
+  if virgl.version().version_compare('>= 0.9.0') and virgl.version().version_compare('< 1.0.0')
+    message('Enabling virglrenderer unstable APIs')
+    virgl = declare_dependency(compile_args: '-DVIRGL_RENDERER_UNSTABLE_APIS',
+                               dependencies: virgl)
+  endif
 endif
 blkio = not_found
 if not get_option('blkio').auto() or have_block