From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62927CA0ECA for ; Tue, 12 Sep 2023 13:45:14 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.600496.936138 (Exim 4.92) (envelope-from ) id 1qg3hG-0000Cf-Gb; Tue, 12 Sep 2023 13:44:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 600496.936138; Tue, 12 Sep 2023 13:44:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qg3hG-0000CY-DC; Tue, 12 Sep 2023 13:44:54 +0000 Received: by outflank-mailman (input) for mailman id 600496; Tue, 12 Sep 2023 13:44:53 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qg3hF-0000CS-0J for xen-devel@lists.xenproject.org; Tue, 12 Sep 2023 13:44:53 +0000 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8b1fd9ee-5172-11ee-9b0d-b553b5be7939; Tue, 12 Sep 2023 15:44:50 +0200 (CEST) Received: from [192.168.2.112] (109-252-153-31.dynamic.spd-mgts.ru [109.252.153.31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id BE0926607327; Tue, 12 Sep 2023 14:44:47 +0100 (BST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8b1fd9ee-5172-11ee-9b0d-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1694526289; bh=EHkKfcqe57CDCX9ziDQSu/VbRqDXV7EcPgLHzQgJnxE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=jRPAe+nhtgNxyMDTkHqXS+GRXWnK6XcdxqC+YvLEr+CRpkQThU97p3s/e0f0F6+xm eL7XdGPLQoxmVnWgpBJDe1dxYX2lVwP9QPCRMCM5MYB4H7NBRDX28+dtmAQ//GlAdG 2eY8+qUcgBJrriFIUQxyJpCfPm9b8V2g+Ip3fc/LsHL+H8V9iIuUZ0OckI0yh7Nr7j DI7d0CaKWZriF9NKfh5XD+RkDP4ZY+I/SsiYelZr9Np+b3zOvLU/6nd43UJOPqyVdv IQNFPUBxQ/k5lotYBHy5DEzObPy83RfV7lP4/omn3VEO/uT1F4He0d9U+DMggx3bhg 9vfDPoMqf6fDg== Message-ID: Date: Tue, 12 Sep 2023 16:44:45 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [QEMU PATCH v4 12/13] virtio-gpu: Initialize Venus Content-Language: en-US To: Huang Rui Cc: Antonio Caggiano , Gerd Hoffmann , "Michael S . Tsirkin" , Stefano Stabellini , Anthony PERARD , "Dr . David Alan Gilbert" , Robert Beckett , =?UTF-8?Q?Alex_Benn=c3=a9e?= , "qemu-devel@nongnu.org" , "xen-devel@lists.xenproject.org" , Gurchetan Singh , "ernunes@redhat.com" , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Akihiko Odaki , Alyssa Ross , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , "Deucher, Alexander" , "Koenig, Christian" , "Ragiadakou, Xenia" , "Pelloux-Prayer, Pierre-Eric" , "Huang, Honglei1" , "Zhang, Julia" , "Chen, Jiqian" References: <20230831093252.2461282-1-ray.huang@amd.com> <20230831093252.2461282-13-ray.huang@amd.com> <5462a77f-c66d-af2d-fc07-df9f787558c2@collabora.com> From: Dmitry Osipenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 9/9/23 13:53, Huang Rui wrote: > On Thu, Aug 31, 2023 at 11:51:50PM +0800, Dmitry Osipenko wrote: >> On 8/31/23 13:40, Antonio Caggiano wrote: >>> Hi Huang, >>> >>> Thank you for pushing this forward! >>> >>> On 31/08/2023 11:32, Huang Rui wrote: >>>> From: Antonio Caggiano >>>> >>>> Request Venus when initializing VirGL. >>>> >>>> Signed-off-by: Antonio Caggiano >>>> Signed-off-by: Huang Rui >>>> --- >>>> >>>> v1->v2: >>>>      - Rebase to latest version >>>> >>>>   hw/display/virtio-gpu-virgl.c | 2 ++ >>>>   1 file changed, 2 insertions(+) >>>> >>>> diff --git a/hw/display/virtio-gpu-virgl.c >>>> b/hw/display/virtio-gpu-virgl.c >>>> index 83cd8c8fd0..c5a62665bd 100644 >>>> --- a/hw/display/virtio-gpu-virgl.c >>>> +++ b/hw/display/virtio-gpu-virgl.c >>>> @@ -887,6 +887,8 @@ int virtio_gpu_virgl_init(VirtIOGPU *g) >>>>       } >>>>   #endif >>>>   +    flags |= VIRGL_RENDERER_VENUS; >>>> + >>> >>> VIRGL_RENDERER_VENUS is a symbol only available from virglrenderer 0.9.1 >>> [0] and only if VIRGL_RENDERER_UNSTABLE_APIS is defined. >>> >>> Luckily for us, VIRGL_RENDERER_UNSTABLE_APIS is defined unconditionally >>> from virglrenderer 0.9.0 [1], so we could check for that in >>> qemu/meson.build >>> >>> e.g. >>> >>> >>>   if virgl.version().version_compare('>= 0.9.0') >>>     message('Enabling virglrenderer unstable APIs') >>>     virgl = declare_dependency(compile_args: >>> '-DVIRGL_RENDERER_UNSTABLE_APIS', >>>                                dependencies: virgl) >>>   endif >>> >>> >>> Also, while testing this with various versions of virglrenderer, I >>> realized there are no guarantees for Venus backend to be available in >>> the linked library. Virglrenderer should be built with >>> -Dvenus_experimental=true, and if that is not the case, the following >>> virgl_renderer_init would fail for previous versions of virglrenderer or >>> in case it has not been built with venus support. >>> >>> I would suggest another approach for that which tries initializing Venus >>> only if VIRGL_RENDERER_VENUS is actually defined. Then, if it fails >>> cause virglrenderer has not been built with venus support, try again >>> falling back to virgl only. >> >> All the APIs will be stabilized with the upcoming virglrender 1.0 >> release that will happen soon. There is also a venus protocol bump, qemu >> will have to bump virglrenderer's version dependency to 1.0 for venus >> and other new features. >> > > Dmitry, do you know the timeline of virglrender 1.0? Should be end of this week or next week -- Best regards, Dmitry