D18570: EGLStream DRM Backend Initial Implementation

Erik Kurzinger <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
ekurzinger added inline comments.

INLINE COMMENTS

> graesslin wrote in CMakeLists.txt:29
> Why are these two libraries needed?

wayland-server is needed in order to register the wl_eglstream_controller interface. The NVIDIA driver uses this when an application creates a native EGL window to pass the corresponding EGLStream to the compositor

dl is needed because we dynamically load libnvidia-egl-wayland.so since that library would only be present on systems with the NVIDIA driver installed, so we would only want to require it if using the EGLStream backend.

> graesslin wrote in drm_backend.cpp:751
> Wouldn't it make more sense to try the available backends? E.g first create EglGbmBackend, if that fails create EglStreamBackend - comparable to how we load the compositor.

If Mesa is available, creating an EglGbmBackend should always succeed, I believe. On systems running the NVIDIA driver it will just fall back to using llvmpipe-based software rendering (of course, with abysmal performance).

We could attempt to create the EglStreamBackend first, which should fail on any non-NVIDIA systems, and then fall back to GBM (and then QPainter). Alternatively, I suppose we would need some way to detect if the NVIDIA driver is present. There are probably a few ways to do this but they might be a little hacky.

And re: zzag I can totally make the EGLStream stuff compile-time optional if that would be preferred, I'll work on an amended version of the change and get it up shortly.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D18570

To: ekurzinger, romangeints, davidedmundson, graesslin, #kwin, romangg
Cc: romangg, hein, nicolasfella, zzag, kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.