<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 10, 2023 at 9:41 PM Huang Rui <<a href="mailto:ray.huang@amd.com">ray.huang@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Oct 10, 2023 at 11:52:14PM +0800, Dmitry Osipenko wrote:<br>
> On 10/10/23 18:40, Dmitry Osipenko wrote:<br>
> > On 10/10/23 16:57, Huang Rui wrote:<br>
> >> These definitions are used fro qemu, and qemu imports this marco in the<br>
> >> headers to enable gfxstream, venus, cross domain, and drm (native<br>
> >> context) for virtio gpu. So it should add them even kernel doesn't use<br>
> >> this.<br>
> >><br>
> >> Signed-off-by: Huang Rui <<a href="mailto:ray.huang@amd.com" target="_blank">ray.huang@amd.com</a>><br>
> >> Reviewed-by: Akihiko Odaki <<a href="mailto:akihiko.odaki@daynix.com" target="_blank">akihiko.odaki@daynix.com</a>><br>
> >> ---<br>
> >><br>
> >> Changes V1 -> V2:<br>
> >> - Add all capsets including gfxstream and venus in kernel header (Dmitry Osipenko)<br>
> >><br>
> >> Changes V2 -> V3:<br>
> >> - Add missed capsets including cross domain and drm (native context)<br>
> >>   (Dmitry Osipenko)<br>
> >><br>
> >> v1: <a href="https://lore.kernel.org/lkml/20230915105918.3763061-1-ray.huang@amd.com/" rel="noreferrer" target="_blank">https://lore.kernel.org/lkml/20230915105918.3763061-1-ray.huang@amd.com/</a><br>
> >> v2: <a href="https://lore.kernel.org/lkml/20231010032553.1138036-1-ray.huang@amd.com/" rel="noreferrer" target="_blank">https://lore.kernel.org/lkml/20231010032553.1138036-1-ray.huang@amd.com/</a><br>
> >><br>
> >>  include/uapi/linux/virtio_gpu.h | 4 ++++<br>
> >>  1 file changed, 4 insertions(+)<br>
> >><br>
> >> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h<br>
> >> index f556fde07b76..240911c8da31 100644<br>
> >> --- a/include/uapi/linux/virtio_gpu.h<br>
> >> +++ b/include/uapi/linux/virtio_gpu.h<br>
> >> @@ -309,6 +309,10 @@ struct virtio_gpu_cmd_submit {<br>
> >>  <br>
> >>  #define VIRTIO_GPU_CAPSET_VIRGL 1<br>
> >>  #define VIRTIO_GPU_CAPSET_VIRGL2 2<br>
> >> +#define VIRTIO_GPU_CAPSET_GFXSTREAM 3<br>
> > <br>
> > The GFXSTREAM capset isn't correct, it should be GFXSTREAM_VULKAN in<br>
> > accordance to [1] and [2]. There are more capsets for GFXSTREAM.<br>
> > <br>
> > [1]<br>
> > <a href="https://github.com/google/crosvm/blob/main/rutabaga_gfx/src/rutabaga_utils.rs#L172" rel="noreferrer" target="_blank">https://github.com/google/crosvm/blob/main/rutabaga_gfx/src/rutabaga_utils.rs#L172</a><br>
> > <br>
> > [2]<br>
> > <a href="https://patchwork.kernel.org/project/qemu-devel/patch/20231006010835.444-7-gurchetansingh@chromium.org/" rel="noreferrer" target="_blank">https://patchwork.kernel.org/project/qemu-devel/patch/20231006010835.444-7-gurchetansingh@chromium.org/</a><br>
> <br>
> Though, maybe those are "rutabaga" capsets that not related to<br>
> virtio-gpu because crosvm has another defs for virtio-gpu capsets [3].<br>
> The DRM capset is oddly missing in [3] and code uses "rutabaga" capset<br>
> for DRM and virtio-gpu.<br>
> <br>
> [3]<br>
> <a href="https://github.com/google/crosvm/blob/main/devices/src/virtio/gpu/protocol.rs#L416" rel="noreferrer" target="_blank">https://github.com/google/crosvm/blob/main/devices/src/virtio/gpu/protocol.rs#L416</a><br>
<br>
Yes, [3] is the file that I referred to add these capsets definitions. And<br>
it's defined as gfxstream not gfxstream_vulkan.<br>
<br>
> <br>
> Gurchetan, could you please clarify which capsets definitions are<br>
> related to virtio-gpu and gfxstream. The<br>
> GFXSTREAM_VULKAN/GLES/MAGMA/COMPOSER or just the single GFXSTREAM?</blockquote><div><br></div><div>It should be GFXSTREAM_VULKAN.  The rest are more experimental and easy to modify in terms of the enum value, should the need arise.</div><div><br></div><div>I imagine the virtio-spec update to reflect the GFXSTREAM to GFXSTREAM_VULKAN change will happen eventually.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
<br>
Gurchetan, may we have your insight?<br>
<br>
Thanks,<br>
Ray<br>
<br>
> -- <br>
> Best regards,<br>
> Dmitry<br>
> <br>
</blockquote></div></div>