Commit a8f519dc authored by Xaver Hugl's avatar Xaver Hugl
Browse files

platforms/drm: allow overriding eglstream choice

Add a new environment variable KWIN_DRM_FORCE_EGL_STREAMS that, when set
to an integer value other than 0, makes KWin prefer EglStreams over gbm.

(cherry picked from commit ebaf2e61)
parent 44c456cf
......@@ -78,7 +78,11 @@ DrmGpu::DrmGpu(DrmBackend *backend, const QString &devNode, int fd, dev_t device
m_useEglStreams = m_isNVidia;
m_gbmDevice = gbm_create_device(m_fd);
if (m_gbmDevice) {
bool envVarIsSet = false;
bool value = qEnvironmentVariableIntValue("KWIN_DRM_FORCE_EGL_STREAMS", &envVarIsSet) != 0;
if (envVarIsSet) {
m_useEglStreams = m_isNVidia && value;
} else if (m_gbmDevice) {
m_useEglStreams = m_isNVidia && strcmp(gbm_device_get_backend_name(m_gbmDevice), "nvidia") != 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment