[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [QEMU PATCH v5 06/13] virtio-gpu: Support context init feature with virglrenderer
- To: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
- From: Huang Rui <ray.huang@xxxxxxx>
- Date: Sat, 16 Sep 2023 18:36:30 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=P+YAeIhE79Tdyh4UChFST6MFzOP1UNgLVHGwu57RtmI=; b=cFrItww3QdflLknNQ2/g7KftOICM6UrihyN80XxV3qkYJGuy72Y6WPDeUu3lLA2vMK5pJvGon8t7jjG9lF2QJDYA0L/LDIfpc14QXrgtQGC39JhSFh14UEPMj0QrjbK/cDtP1aKxRD0Oq87+7/VNikE0YRR2Zhavbxe0iN86jBa6jbSROv5sIGWA1UzBZc06k+7gerZSmBlEWaFrYrPWkp94LbMQnYyQZc51lDUlxgm7TvB0Bi5M+y1k1u5YfD16x2uAZfO9bJ+zrIiWCueXHCRjjBUttqV+Tm8fCmC4SIGLzGC5Ne0z58WZZ9hAwDCaUzn+8cMrajVUnD0vNf4urw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HYSGu3CrWw6gARHce09vOajteZ9S8srHKT1Xe2TzDxFWgA8OoK1E95hYwjJ6NkjWALAVa8URKR0fZ4S3C6lfo2WEfSkmuUpQ/C8Ek68LbhyMr90XxYXh+YV3y4/qp2gAbDAM7pU4l7LeOKxgekNTvKiCsf/SWR9VsFKh+NuFLm/rkjSsKDWPDNF4WAwMamxjTtY6IsGX1uyj431NhNPBn+LsnoVdDhnFFda3QU+9z9yERKnjPTC7BgSG4Yw26LZAgNkSKZGgZ4Sw/jgoacyIHCHOgR6tElrIBDTaqJoGzFnNGELTzPHQta/1hB52+HUON7fAuGFuvi47hhT+jmE1EQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx>, "Michael S . Tsirkin" <mst@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Antonio Caggiano <quic_acaggian@xxxxxxxxxxx>, "Dr . David Alan Gilbert" <dgilbert@xxxxxxxxxx>, Robert Beckett <bob.beckett@xxxxxxxxxxxxx>, Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx>, Albert Esteve <aesteve@xxxxxxxxxx>, "ernunes@xxxxxxxxxx" <ernunes@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Alyssa Ross <hi@xxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Deucher, Alexander" <Alexander.Deucher@xxxxxxx>, "Koenig, Christian" <Christian.Koenig@xxxxxxx>, "Ragiadakou, Xenia" <Xenia.Ragiadakou@xxxxxxx>, "Pelloux-Prayer, Pierre-Eric" <Pierre-eric.Pelloux-prayer@xxxxxxx>, "Huang, Honglei1" <Honglei1.Huang@xxxxxxx>, "Zhang, Julia" <Julia.Zhang@xxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>, Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>
- Delivery-date: Sat, 16 Sep 2023 10:37:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Sat, Sep 16, 2023 at 12:58:31AM +0800, Akihiko Odaki wrote:
> On 2023/09/15 20:11, Huang Rui wrote:
> > Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init
> > feature flags.
> > We would like to enable the feature with virglrenderer, so add to create
> > virgl renderer context with flags using context_id when valid.
> >
> > Originally-by: Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>
> > Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
> > ---
> >
> > V4 -> V5:
> > - Inverted patch 5 and 6 because we should configure
> > HAVE_VIRGL_CONTEXT_INIT firstly. (Philippe)
> >
> > hw/display/virtio-gpu-virgl.c | 13 +++++++++++--
> > hw/display/virtio-gpu.c | 2 ++
> > 2 files changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
> > index 8bb7a2c21f..312953ec16 100644
> > --- a/hw/display/virtio-gpu-virgl.c
> > +++ b/hw/display/virtio-gpu-virgl.c
> > @@ -106,8 +106,17 @@ static void virgl_cmd_context_create(VirtIOGPU *g,
> > trace_virtio_gpu_cmd_ctx_create(cc.hdr.ctx_id,
> > cc.debug_name);
> >
> > - virgl_renderer_context_create(cc.hdr.ctx_id, cc.nlen,
> > - cc.debug_name);
> > + if (cc.context_init) {
> > +#ifdef HAVE_VIRGL_CONTEXT_INIT
> > + virgl_renderer_context_create_with_flags(cc.hdr.ctx_id,
> > + cc.context_init,
> > + cc.nlen,
> > + cc.debug_name);
> > + return;
> > +#endif
> > + }
> > +
> > + virgl_renderer_context_create(cc.hdr.ctx_id, cc.nlen, cc.debug_name);
> > }
> >
> > static void virgl_cmd_context_destroy(VirtIOGPU *g,
> > diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> > index 3e658f1fef..a66cbd9930 100644
> > --- a/hw/display/virtio-gpu.c
> > +++ b/hw/display/virtio-gpu.c
> > @@ -1506,6 +1506,8 @@ static Property virtio_gpu_properties[] = {
> > DEFINE_PROP_BIT("blob", VirtIOGPU, parent_obj.conf.flags,
> > VIRTIO_GPU_FLAG_BLOB_ENABLED, false),
> > DEFINE_PROP_SIZE("hostmem", VirtIOGPU, parent_obj.conf.hostmem, 0),
> > + DEFINE_PROP_BIT("context_init", VirtIOGPU, parent_obj.conf.flags,
> > + VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED, false),
> > DEFINE_PROP_END_OF_LIST(),
> > };
> >
>
> I think it's more convenient if this feature is enabled by default.
Yes, I will update it in next version.
Thanks,
Ray
|