D18570: EGLStream DRM Backend Initial Implementation

Erik Kurzinger <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
ekurzinger created this revision.
ekurzinger added reviewers: romangeints, davidedmundson, graesslin, KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
ekurzinger requested review of this revision.

REVISION SUMMARY
  This is the initial implementation of a DRM backend based on the EGLDevice, EGLOutput, and EGLStream extensions, supporting NVIDIA graphics hardware using their proprietary driver. The new backend will be used if the environment variable KWIN_DRM_USE_EGLDEVICE is set. On initialization, it will attempt to create an EGLDevice based on the DRM device currently in use and create EGLOutputs and EGLStreams for any attached displays. These are used to control presentation of the final composited frame. Additionally, it will register the wl_eglstream_controller Wayland interface so that native EGL windows created by clients can be attached to an EGLStream allowing buffer contents to be shared with the compositor as a GL texture.
  
  Currently, this backend is incompatible with atomic modesetting and hardware cursors. Support for both is planned as future work, as is integration with the autotesting framework and support for remote access.
  
  At this time there is a known bug in the NVIDIA driver where plasmashell's tool-tip window will appear blank if it is resized. A fix is in development and should be present in an upcoming driver release.

TEST PLAN
  On a system with an NVIDIA graphics card running a recent release of their proprietary driver
  
  - Ensure EGL external platform support is installed https://github.com/NVIDIA/eglexternalplatform
  - Start a plasma wayland session with the environment variable KWIN_DRM_USE_EGLDEVICE set
  - Ensure output from KWin OpenGL initialization indicates the NVIDIA EGL driver is in use (as opposed to Mesa / llvmpipe).
  - Desktop should be fully functional and perform smoothly.

REPOSITORY
  R108 KWin

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

AFFECTED FILES
  platformsupport/scenes/opengl/abstract_egl_backend.cpp
  platformsupport/scenes/opengl/abstract_egl_backend.h
  plugins/platforms/drm/CMakeLists.txt
  plugins/platforms/drm/drm_backend.cpp
  plugins/platforms/drm/drm_backend.h
  plugins/platforms/drm/drm_output.h
  plugins/platforms/drm/egl_stream_backend.cpp
  plugins/platforms/drm/egl_stream_backend.h

To: ekurzinger, romangeints, davidedmundson, graesslin, #kwin
Cc: kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, 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.