About migrating framebuffers in multi-GPU compositors

Hoosier, Matt Matt.Hoosier at garmin.com
Wed Mar 23 14:19:08 UTC 2022


Hi,

I recently had a reason to wade through Mutter's code to support systems with more than one GPU. I was a bit surprised to see that it supports several different strategies for dealing with scanning out a buffer on a KMS output not associated with the GPU where the buffer was originally rendered.

In particular, the approach of using the secondary GPU's OpenGL implementation to blit into a dumb buffer was really unexpected. Typically, dumb buffers get described as a really slow, uncached mapping of GPU memory into the CPU.

The support got added here (by Pekka):

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/615

If I follow this right, the blit occurs directly between video memory owned by the primary GPU into dumb-buffer memory owned by the secondary GPU, without laboriously using the CPU to do PIO. Does this imply that the two GPUs' drivers have to be at least minimally aware of each other to negotiate some kind of DMA path directly between the two?

-Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20220323/e6f8937f/attachment.htm>


More information about the wayland-devel mailing list