2015-05-05 15:58:09 +00:00
|
|
|
set(DRM_SOURCES
|
|
|
|
drm_backend.cpp
|
2016-08-31 12:00:31 +00:00
|
|
|
drm_object.cpp
|
|
|
|
drm_object_connector.cpp
|
|
|
|
drm_object_crtc.cpp
|
|
|
|
drm_object_plane.cpp
|
2016-03-21 14:11:17 +00:00
|
|
|
drm_output.cpp
|
|
|
|
drm_buffer.cpp
|
|
|
|
drm_inputeventfilter.cpp
|
2019-07-02 10:01:37 +00:00
|
|
|
edid.cpp
|
2015-05-05 15:58:09 +00:00
|
|
|
logging.cpp
|
|
|
|
scene_qpainter_drm_backend.cpp
|
|
|
|
screens_drm.cpp
|
2020-10-05 21:05:55 +00:00
|
|
|
drm_gpu.cpp
|
2015-05-05 15:58:09 +00:00
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (HAVE_GBM)
|
GBM remote access support for KWin
Summary:
Implements a KWayland protocol to pass GBM fd from KWin to KRfb and
addictions to relevant projects from both sides.
Note that this patch does not affect default behaviour of mentioned projects. It can be used
only with KWIN_REMOTE=1 in env from KWin side and with preferredFrameBufferPlugin=gbm in krfbrc from
KRfb side. In all other aspects app behaviour remains unchanged.
Test Plan: Launched KWin in Wayland mode, launched KRfb in it, launched KRDC on a laptop, connected in read-only mode, observed a correctly retrieved desktop with Krfb window
Reviewers: graesslin, davidedmundson, romangg, #kwin
Reviewed By: davidedmundson, romangg, #kwin
Subscribers: kossebau, jgrulich, romangg, ngraham, alexeymin, aacid, kwin, #kwin, davidedmundson, plasma-devel
Tags: #plasma_on_wayland, #kwin
Maniphest Tasks: T5653, T7785
Differential Revision: https://phabricator.kde.org/D1230
2016-04-30 23:01:44 +00:00
|
|
|
set(DRM_SOURCES ${DRM_SOURCES}
|
|
|
|
egl_gbm_backend.cpp
|
|
|
|
drm_buffer_gbm.cpp
|
|
|
|
gbm_surface.cpp
|
2020-07-22 17:31:23 +00:00
|
|
|
gbm_dmabuf.cpp
|
GBM remote access support for KWin
Summary:
Implements a KWayland protocol to pass GBM fd from KWin to KRfb and
addictions to relevant projects from both sides.
Note that this patch does not affect default behaviour of mentioned projects. It can be used
only with KWIN_REMOTE=1 in env from KWin side and with preferredFrameBufferPlugin=gbm in krfbrc from
KRfb side. In all other aspects app behaviour remains unchanged.
Test Plan: Launched KWin in Wayland mode, launched KRfb in it, launched KRDC on a laptop, connected in read-only mode, observed a correctly retrieved desktop with Krfb window
Reviewers: graesslin, davidedmundson, romangg, #kwin
Reviewed By: davidedmundson, romangg, #kwin
Subscribers: kossebau, jgrulich, romangg, ngraham, alexeymin, aacid, kwin, #kwin, davidedmundson, plasma-devel
Tags: #plasma_on_wayland, #kwin
Maniphest Tasks: T5653, T7785
Differential Revision: https://phabricator.kde.org/D1230
2016-04-30 23:01:44 +00:00
|
|
|
)
|
2015-05-05 15:58:09 +00:00
|
|
|
endif()
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (HAVE_EGL_STREAMS)
|
[platforms/drm] EGLStream DRM Backend Initial Implementation
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_EGL_STREAMS 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.
At this time there are two known bugs in the NVIDIA driver's EGL implementation
affecting desktop functionality. The first can result in tooltip windows drawn
by plasmashell to contain incorrect contents. The second prevents KWayland from
being able to query the format of EGLStream-backed buffers which interferes
with the blur effect. Fixes for both of these are currently in development and
should appear in an upcoming NVIDIA driver release.
Additionally, hardware cursors are currently not supported with this backend.
Enabling them causes the desktop to intermittently hang for several seconds.
This is also likely a bug in the NVIDIA DRM-KMS implementation but the root
cause is still under investigation.
Test Plan:
On a system with an NVIDIA graphics card running a recent release of their
proprietary driver
* Ensure the nvidia_drm kernel module is loaded with the option "modeset=1"
("# cat /sys/module/nvidia_drm/parameters/modeset" should print "Y")
* Ensure EGL external platform support is installed
https://github.com/NVIDIA/eglexternalplatform
* Ensure KWin was build with the CMake option
KWIN_BUILD_EGL_STREAM_BACKEND=ON (this is the default)
* Start a plasma wayland session with the environment variable
KWIN_DRM_USE_EGL_STREAMS 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.
Reviewers: #kwin, romangg, davidedmundson
Reviewed By: #kwin, romangg, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18570
2019-04-15 14:26:22 +00:00
|
|
|
set(DRM_SOURCES ${DRM_SOURCES}
|
|
|
|
egl_stream_backend.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2017-09-08 20:30:18 +00:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl)
|
|
|
|
|
2015-05-05 15:58:09 +00:00
|
|
|
add_library(KWinWaylandDrmBackend MODULE ${DRM_SOURCES})
|
2018-12-06 17:38:36 +00:00
|
|
|
set_target_properties(KWinWaylandDrmBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
|
2020-09-02 16:19:04 +00:00
|
|
|
target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm SceneQPainterBackend SceneOpenGLBackend)
|
2015-05-05 15:58:09 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (HAVE_GBM)
|
2015-05-05 15:58:09 +00:00
|
|
|
target_link_libraries(KWinWaylandDrmBackend gbm::gbm)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS
|
|
|
|
KWinWaylandDrmBackend
|
|
|
|
DESTINATION
|
|
|
|
${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/
|
|
|
|
)
|