From: "Alex Bennée" <alex.bennee@linaro.org>
To: Antonio Caggiano <antonio.caggiano@collabora.com>
Cc: gert.wollny@collabora.com, dmitry.osipenko@collabora.com,
"Michael S. Tsirkin" <mst@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v3 8/9] virtio-gpu: Initialize Venus
Date: Mon, 30 Jan 2023 15:55:21 +0000 [thread overview]
Message-ID: <87mt606mi6.fsf@linaro.org> (raw)
In-Reply-To: <20220926142422.22325-9-antonio.caggiano@collabora.com>
Antonio Caggiano <antonio.caggiano@collabora.com> writes:
> Request Venus when initializing VirGL.
>
> Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
> ---
> hw/display/virtio-gpu-virgl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
> index 16f600adbb..0f17bdddd0 100644
> --- a/hw/display/virtio-gpu-virgl.c
> +++ b/hw/display/virtio-gpu-virgl.c
> @@ -806,7 +806,7 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
> {
> int ret;
>
> - ret = virgl_renderer_init(g, 0, &virtio_gpu_3d_cbs);
> + ret = virgl_renderer_init(g, VIRGL_RENDERER_VENUS, &virtio_gpu_3d_cbs);
> if (ret != 0) {
> error_report("virgl could not be initialized: %d", ret);
> return ret;
We need to probe for Venus support in virgl in configure:
irtio-gpu-virgl.c.o -c ../../hw/display/virtio-gpu-virgl.c
../../hw/display/virtio-gpu-virgl.c: In function ‘virtio_gpu_virgl_init’:
../../hw/display/virtio-gpu-virgl.c:820:34: error: ‘VIRGL_RENDERER_VENUS’ undeclared (first use in this function); did you mean ‘VIRGL_RENDERER_USE_EGL’?
820 | ret = virgl_renderer_init(g, VIRGL_RENDERER_VENUS, &virtio_gpu_3d_cbs);
| ^~~~~~~~~~~~~~~~~~~~
| VIRGL_RENDERER_USE_EGL
../../hw/display/virtio-gpu-virgl.c:820:34: note: each undeclared identifier is reported only once for each function it appears in
While I fixed the callback with:
modified hw/display/virtio-gpu-virgl.c
@@ -744,10 +744,12 @@ static int virgl_make_context_current(void *opaque, int scanout_idx,
qctx);
}
+#if VIRGL_RENDERER_CALLBACKS_VERSION >= 4
static void *virgl_get_egl_display(void *opaque)
{
return eglGetCurrentDisplay();
}
+#endif
static struct virgl_renderer_callbacks virtio_gpu_3d_cbs = {
.version = 4,
@@ -755,7 +757,9 @@ static struct virgl_renderer_callbacks virtio_gpu_3d_cbs = {
.create_gl_context = virgl_create_context,
.destroy_gl_context = virgl_destroy_context,
.make_current = virgl_make_context_current,
+#if VIRGL_RENDERER_CALLBACKS_VERSION >= 4
.get_egl_display = virgl_get_egl_display,
+#endif
};
static void virtio_gpu_print_stats(void *opaque)
I suspect we shouldn't unconditionally enable VENUS here. This sounds
like it needs a configuration knob on the device, i.e.:
-device virtio-gpu-pci,renderer=venus
where the default is EGL.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2023-01-30 16:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 14:24 [PATCH v3 0/9] virtio-gpu: Support Venus Vulkan driver Antonio Caggiano
2022-09-26 14:24 ` [PATCH v3 1/9] virtio: Add shared memory capability Antonio Caggiano
2023-01-30 12:51 ` Alex Bennée
2022-09-26 14:24 ` [PATCH v3 2/9] virtio-gpu: hostmem Antonio Caggiano
2023-01-30 16:22 ` Alex Bennée
2022-09-26 14:24 ` [PATCH v3 3/9] virtio-gpu: Handle resource blob commands Antonio Caggiano
2023-01-30 16:29 ` Alex Bennée
2022-09-26 14:24 ` [PATCH v3 4/9] virtio-gpu: CONTEXT_INIT feature Antonio Caggiano
2022-09-26 14:24 ` [PATCH v3 5/9] virtio-gpu: Unrealize Antonio Caggiano
2023-01-30 18:36 ` Alex Bennée
2022-09-26 14:24 ` [PATCH v3 6/9] virtio-gpu: Resource UUID Antonio Caggiano
2022-09-26 14:24 ` [PATCH v3 7/9] virtio-gpu: Support Venus capset Antonio Caggiano
2022-09-26 14:24 ` [PATCH v3 8/9] virtio-gpu: Initialize Venus Antonio Caggiano
2023-01-30 15:55 ` Alex Bennée [this message]
2022-09-26 14:24 ` [PATCH v3 9/9] virtio-gpu: Get EGL Display callback Antonio Caggiano
2023-01-30 15:49 ` Alex Bennée
2023-01-30 17:00 ` [PATCH v3 0/9] virtio-gpu: Support Venus Vulkan driver Alex Bennée
2023-01-31 23:14 ` Dmitry Osipenko
2023-03-06 22:41 ` Gurchetan Singh
2023-03-13 12:58 ` Marc-André Lureau
2023-03-13 13:27 ` Dmitry Osipenko
2023-03-13 14:51 ` Alex Bennée
2023-03-13 15:03 ` Dmitry Osipenko
2023-03-13 18:44 ` Gurchetan Singh
2023-03-17 21:40 ` Gurchetan Singh
2023-03-22 8:00 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mt606mi6.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=antonio.caggiano@collabora.com \
--cc=dmitry.osipenko@collabora.com \
--cc=gert.wollny@collabora.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).