Re: Using virtio-gpu instead of virtwl

Thomas Leonard
2022-04-13T16:12:32Z

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

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

--
talex5 (GitHub/Twitter)