Message ID | 20210525211753.1086069-1-jason@jlekstrand.net (mailing list archive) |
---|---|
Headers | show |
Series | dma-buf: Add an API for exporting sync files (v11) | expand |
On Tue, May 25, 2021 at 2:18 PM Jason Ekstrand <jason@jlekstrand.net> wrote: > Modern userspace APIs like Vulkan are built on an explicit > synchronization model. This doesn't always play nicely with the > implicit synchronization used in the kernel and assumed by X11 and > Wayland. The client -> compositor half of the synchronization isn't too > bad, at least on intel, because we can control whether or not i915 > synchronizes on the buffer and whether or not it's considered written. We might have an important use case for this half, for virtio-gpu and Chrome OS. When the guest compositor acts as a proxy to connect guest apps to the host compositor, implicit fencing requires the guest compositor to do a wait before forwarding the buffer to the host compositor. With this patch, the guest compositor can extract the dma-fence from the buffer, and if the fence is a virtio-gpu fence, forward both the fence and the buffer to the host compositor. It will allow us to convert a guest-side wait into a host-side wait.
On Thu, Jun 10, 2021 at 3:11 PM Chia-I Wu <olvaffe@gmail.com> wrote: > > On Tue, May 25, 2021 at 2:18 PM Jason Ekstrand <jason@jlekstrand.net> wrote: > > Modern userspace APIs like Vulkan are built on an explicit > > synchronization model. This doesn't always play nicely with the > > implicit synchronization used in the kernel and assumed by X11 and > > Wayland. The client -> compositor half of the synchronization isn't too > > bad, at least on intel, because we can control whether or not i915 > > synchronizes on the buffer and whether or not it's considered written. > We might have an important use case for this half, for virtio-gpu and Chrome OS. > > When the guest compositor acts as a proxy to connect guest apps to the > host compositor, implicit fencing requires the guest compositor to do > a wait before forwarding the buffer to the host compositor. With this > patch, the guest compositor can extract the dma-fence from the buffer, > and if the fence is a virtio-gpu fence, forward both the fence and the > buffer to the host compositor. It will allow us to convert a > guest-side wait into a host-side wait. Yeah, I think the first half solves a lot of problems. I'm rebasing it now and will send a v12 series shortly. I don't think there's a lot standing between the first few patches and merging. I've got IGT tests and I'm pretty sure the code is good. The last review cycle got distracted with some renaming fun. --Jason