[Libre-soc-dev] gpus and fences
Jacob Lifshay
programmerjake at gmail.com
Tue Apr 20 21:41:06 BST 2021
On Tue, Apr 20, 2021, 12:00 Jonathan Neuschäfer <j.neuschaefer at gmx.net>
wrote:
> On Tue, Apr 20, 2021 at 09:52:41AM -0700, Jacob Lifshay wrote:
> > This thread on dri-devel is relevant for Kazan, having to do with what
> kind
> > of synchronization primitives the linux gpu ecosystem should use:
> > https://lists.freedesktop.org/archives/dri-devel/2021-April/303865.html
> >
> > Kazan runs into issues due to being in user-space and the standard linux
> > gpu sync primitive being a dma-fence which is required to have
> kernel-level
> > finite completion time guarantees. user-space can't directly provide
> > something like that since someone could send sigstop or something to the
> > user process, causing a kernel-level deadlock.
>
> Silly question perhaps — but would Kazan need to touch DRI and the
> kernel, at all?
>
yes:
1. for Vulkan Display support (using Vulkan as the platform-independent
interface to video scan-out hardware)
2. for supporting more efficient image layouts between the compositor and
application, since the only supported layout in wayland is simple linear
(not very efficient for texturing or for reducing required memory
bandwidth) unless we use wayland's kernel drm interface (where dma-fences
are needed...)
3. for Vulkan's standard linux ipc interface (assumes we want dma-fences...
unless we use the driver-specific interface (where applications just see an
opaque file descriptor) where it won't interoperate with anything other
than Kazan)
>
> It seems to me that, like llvmpipe and OpenSWR, it wouldn't need any
> kernel component, because it just runs in userspace on the same CPUs as
> the application.
>
ideally, however llvmpipe and OpenSWR take a performance hit from not being
able to use the most efficient image layout for ipc (wayland and otherwise)
as explained above.
Xorg has the same issues as wayland, but since it's not really being
maintained anymore (outside of wayland support) and since most linux
desktops are switching to wayland, we can ignore performance hits on it for
the most part.
Jacob
More information about the Libre-soc-dev
mailing list