diff --git a/CMakeLists.txt b/CMakeLists.txt index e3867e20bc..4a00970b9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,21 +203,14 @@ set_package_properties(UDev PROPERTIES ) find_package(Libdrm 2.4.62) -set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL PURPOSE "Required for drm output on Wayland.") -set(HAVE_DRM FALSE) -if (Libdrm_FOUND) - set(HAVE_DRM TRUE) -endif() +set_package_properties(Libdrm PROPERTIES TYPE REQUIRED PURPOSE "Required for drm output on Wayland.") find_package(gbm) set_package_properties(gbm PROPERTIES TYPE OPTIONAL PURPOSE "Required for egl output of drm backend.") -set(HAVE_GBM FALSE) -if (HAVE_DRM AND gbm_FOUND) - set(HAVE_GBM TRUE) -endif() +set(HAVE_GBM ${gbm_FOUND}) option(KWIN_BUILD_EGL_STREAM_BACKEND "Enable building of EGLStream based DRM backend" ON) -if (HAVE_DRM AND KWIN_BUILD_EGL_STREAM_BACKEND) +if (KWIN_BUILD_EGL_STREAM_BACKEND) set(HAVE_EGL_STREAMS TRUE) endif() diff --git a/src/config-kwin.h.cmake b/src/config-kwin.h.cmake index 2f54718c0d..d399e02c15 100644 --- a/src/config-kwin.h.cmake +++ b/src/config-kwin.h.cmake @@ -16,7 +16,6 @@ #define KWIN_XCLIPBOARD_SYNC_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/org_kde_kwin_xclipboard_syncer" #cmakedefine01 HAVE_X11_XCB #cmakedefine01 HAVE_X11_XINPUT -#cmakedefine01 HAVE_DRM #cmakedefine01 HAVE_GBM #cmakedefine01 HAVE_EGL_STREAMS #cmakedefine01 HAVE_WAYLAND_EGL diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp index fa1f2958c6..70f84a4079 100644 --- a/src/main_wayland.cpp +++ b/src/main_wayland.cpp @@ -289,9 +289,7 @@ void ApplicationWayland::startSession() static const QString s_waylandPlugin = QStringLiteral("KWinWaylandWaylandBackend"); static const QString s_x11Plugin = QStringLiteral("KWinWaylandX11Backend"); static const QString s_fbdevPlugin = QStringLiteral("KWinWaylandFbdevBackend"); -#if HAVE_DRM static const QString s_drmPlugin = QStringLiteral("KWinWaylandDrmBackend"); -#endif static const QString s_virtualPlugin = QStringLiteral("KWinWaylandVirtualBackend"); @@ -312,13 +310,11 @@ static QString automaticBackendSelection(SpawnMode spawnMode) if (qEnvironmentVariableIsSet("DISPLAY")) { return s_x11Plugin; } -#if HAVE_DRM // Only default to drm when there's dri drivers. This way fbdev will be // used when running using nomodeset if (QFileInfo::exists("/dev/dri")) { return s_drmPlugin; } -#endif return s_fbdevPlugin; } @@ -439,9 +435,7 @@ int main(int argc, char * argv[]) const bool hasVirtualOption = hasPlugin(KWin::s_virtualPlugin); const bool hasWaylandOption = hasPlugin(KWin::s_waylandPlugin); const bool hasFramebufferOption = hasPlugin(KWin::s_fbdevPlugin); -#if HAVE_DRM const bool hasDrmOption = hasPlugin(KWin::s_drmPlugin); -#endif QCommandLineOption xwaylandOption(QStringLiteral("xwayland"), i18n("Start a rootless Xwayland server.")); @@ -517,12 +511,10 @@ int main(int argc, char * argv[]) QCommandLineOption libinputOption(QStringLiteral("libinput"), i18n("Enable libinput support for input events processing. Note: never use in a nested session. (deprecated)")); parser.addOption(libinputOption); -#if HAVE_DRM QCommandLineOption drmOption(QStringLiteral("drm"), i18n("Render through drm node.")); if (hasDrmOption) { parser.addOption(drmOption); } -#endif QCommandLineOption inputMethodOption(QStringLiteral("inputmethod"), i18n("Input method that KWin starts."), @@ -594,11 +586,9 @@ int main(int argc, char * argv[]) int outputCount = 1; qreal outputScale = 1; -#if HAVE_DRM if (hasDrmOption && parser.isSet(drmOption)) { pluginName = KWin::s_drmPlugin; } -#endif if (hasSizeOption) { bool ok = false; diff --git a/src/plugins/platforms/CMakeLists.txt b/src/plugins/platforms/CMakeLists.txt index dff63a766d..083bac7c39 100644 --- a/src/plugins/platforms/CMakeLists.txt +++ b/src/plugins/platforms/CMakeLists.txt @@ -1,6 +1,4 @@ -if (HAVE_DRM) - add_subdirectory(drm) -endif() +add_subdirectory(drm) if (HAVE_LINUX_FB_H) add_subdirectory(fbdev) endif() diff --git a/src/workspace.cpp b/src/workspace.cpp index 8190f2e57e..d4dc010006 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -1508,12 +1508,6 @@ QString Workspace::supportInformation() const support.append(yes); #else support.append(no); -#endif - support.append(QStringLiteral("HAVE_DRM: ")); -#if HAVE_DRM - support.append(yes); -#else - support.append(no); #endif support.append(QStringLiteral("HAVE_GBM: ")); #if HAVE_GBM