Re: Using virtio-gpu instead of virtwl

Alyssa Ross
2022-04-14T13:57:52Z

[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]

On Wed, Apr 13, 2022 at 05:12:13PM +0000, Thomas Leonard wrote:
> On Wed, 6 Apr 2022 at 12:19, Thomas Leonard <talex5@gmail.com> wrote:
> [ converting from virtwl to virtio-gpu ]
> > I tried, but failed, to figure out the protocol. I did manage to get a
> > test application showing a little animation, but it crashes after a
> > few seconds.
>
> OK, I found a solution to this: you can just open the device file
> twice and use one instance for Wayland messages and the other for
> allocating images. This avoids the first race. With that, I got the
> proxy converted:
>
> https://github.com/talex5/wayland-proxy-virtwl/pull/28
>
> Though I'm not sure it's an improvement: +1,819 −577 lines!
>
> Instructions for configuring crosvm to use it:
>
> https://github.com/talex5/wayland-proxy-virtwl#virtio-gpu-support
>
> And I wrote up my guesses about the protocol here:
>
> https://github.com/talex5/wayland-proxy-virtwl/blob/master/virtio-spec.md

That's extremely helpful, thanks for writing it up!

> I don't think it's possible to avoid races completely, but it seems to
> be working reasonably well so far.

I wonder if it would be worth asking about the remaining problems on the
relevant kernel mailing lists, since they sound like protocol issues
rather than anything specific to your implementation.

I tracked down the series where they were added[1], perhaps the
From/To/Cc in that posting would be a good starting point?

If you do reach out, please CC me (and this list, if you want)!

[1]: https://lore.kernel.org/dri-devel/20210921232024.817-1-gurchetansingh@chromium.org/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]