[PATCH RFC wayland-protocols] unstable/linux-dmabuf: add wp_linux_dmabuf_device_hint

Simon Ser contact at emersion.fr
Sat Nov 10 13:54:19 UTC 2018

Just a general update about this: I tried to see how we could make Mesa use this
new protocol.

A bad news is that the DRM FD is per-EGLDisplay and I think it would require
quite some changes to make it per-EGLSurface. I'm still new to the Mesa
codebase, so it'd probably make sense to only use the new protocol to get the
device FD, without relying on wl_drm anymore. We could talk about using the
protocol more efficiently in the future. I also think a lot of clients weren't
designed to support multiple device FDs, so it would be nice to have a smoother
upgrade path.

That leaves an issue: the whole protocol provides hints for a surface. When the
EGLDisplay is created we don't have a surface yet. I can think of a few possible

* Create a wl_surface, get the hints, and destroy everything (without mapping
  the surface)
* Allow the get_surface_hints to take a NULL surface
* Add a get_hints request without a wl_surface argument
* Forget about per-surface hints, make hints global
* (Someone else volunteers to patch Mesa to use per-surface FDs)

What do you think?

More information about the wayland-devel mailing list