Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_backend.cpp
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Line(s) | 170 | if (!(*it)->isDpmsEnabled()) { | |||
---|---|---|---|---|---|
171 | // dpms still disabled, need to keep the filter | 171 | // dpms still disabled, need to keep the filter | ||
172 | return; | 172 | return; | ||
173 | } | 173 | } | ||
174 | } | 174 | } | ||
175 | // all outputs are on, disable the filter | 175 | // all outputs are on, disable the filter | ||
176 | m_dpmsFilter.reset(); | 176 | m_dpmsFilter.reset(); | ||
177 | } | 177 | } | ||
178 | 178 | | |||
179 | bool DrmBackend::canLoad() | ||||
180 | { | ||||
181 | // basic sanity check like in openDrm() function | ||||
182 | UdevDevice::Ptr device = m_udev->primaryGpu(); | ||||
183 | if (device) { | ||||
184 | return true; | ||||
185 | } | ||||
186 | // no GPU - no drm backend | ||||
187 | return false; | ||||
188 | } | ||||
189 | | ||||
179 | void DrmBackend::activate(bool active) | 190 | void DrmBackend::activate(bool active) | ||
180 | { | 191 | { | ||
181 | if (active) { | 192 | if (active) { | ||
182 | qCDebug(KWIN_DRM) << "Activating session."; | 193 | qCDebug(KWIN_DRM) << "Activating session."; | ||
183 | reactivate(); | 194 | reactivate(); | ||
184 | } else { | 195 | } else { | ||
185 | qCDebug(KWIN_DRM) << "Deactivating session."; | 196 | qCDebug(KWIN_DRM) << "Deactivating session."; | ||
186 | deactivate(); | 197 | deactivate(); | ||
▲ Show 20 Lines • Show All 611 Lines • Show Last 20 Lines |