[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:32:35 +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=dsvEVklb27yICg9NOj/RmbVN0fwndIiYt1iCTi16vVU=; b=Wf868VRVTl3upXEUNr1iGKNcQRYy5/lCEv4S9nRBVCOp9OFrKqAiDEcfNe0Sa0mYC8Urej2k9D7f/hAKojYkm7xsUj1QVNoj8oSUj34szjWMhPrch9ZvdtzcQUoGJhrGXjInvdx5zLpfiXPx7t9hX0mRcb31XynfcaJSpdUX+Wf6PvY2E1oehg+RMn3AE/X+NBKEwTWUhwNmFOvIS9P7LYEnoFV4RZagdMnHit7biXbI7I74Gzo1LLEl7ERPaLyw1QsP6GEdg1ssRtPM3+6SjOQERafKUEs2AWsy7C7F2usQ1uvI0AEnIWDnxssNvwkXY+29dMY+mAXasgS146GQug==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L6MdulTHMjmfnKMNO4ZXElH2eJwLvd5+bJfuaVEqMYPFphACW4rNe7Bov3R2FnnIXHfcIXQ7gZTHMN8cH6Bujx+eamYgNqNUHSR0tJeACdJrPLPv2YqosnuefKiLW3LS74QZl1YPBjXUHixIhr8Pk0vuEOBosvX4rstxVcIqr+FbH6oUHOzB0KUoPZSNGakQUraLxRBtYwvnCGTTA3+8Bbj+Pgwa3ZH+Qxz4lL5lHjPbaaxROBEmDW5DGs3zDa+z8wFD7EIpt3ZN1TJxc3pRTZCBHfSBQgxgssyguJr6H9u4YqTjfYyu2wirbI/b5zxbXruHCWS0YKlP35dBHzBiDw==
- 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:33:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Sep 15, 2023 at 11:20:46PM +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
>
> This should deal with the case when context_init is set while
> HAVE_VIRGL_CONTEXT_INIT is not defined.
Actually, I received the comment below before:
https://lore.kernel.org/qemu-devel/32588d0e-a1f2-30c4-5e9f-e6e7c4190b65@xxxxxxxxxx/
At original patch set, I have the case while HAVE_VIRGL_CONTEXT_INIT is set
but HAVE_VIRGL_CONTEXT_INIT is not defined. But I think we may encounter
the case that virgl_renderer_context_create_with_flags is not defined in
virglrenderer early version. Should I bring the error message back?
Thanks,
Ray
|