Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.cpp
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Line(s) | 262 | if (isInternal()) { | |||
---|---|---|---|---|---|
263 | connect(kwinApp(), &Application::screensCreated, this, | 263 | connect(kwinApp(), &Application::screensCreated, this, | ||
264 | [this] { | 264 | [this] { | ||
265 | connect(screens()->orientationSensor(), &OrientationSensor::orientationChanged, this, &DrmOutput::automaticRotation); | 265 | connect(screens()->orientationSensor(), &OrientationSensor::orientationChanged, this, &DrmOutput::automaticRotation); | ||
266 | } | 266 | } | ||
267 | ); | 267 | ); | ||
268 | } | 268 | } | ||
269 | 269 | | |||
270 | initOutputDevice(connector); | 270 | initOutputDevice(connector); | ||
271 | 271 | updateDpms(KWayland::Server::OutputInterface::DpmsMode::On); | |||
272 | setEnabled(true); | | |||
273 | return true; | 272 | return true; | ||
274 | } | 273 | } | ||
275 | 274 | | |||
276 | void DrmOutput::initUuid() | 275 | void DrmOutput::initUuid() | ||
277 | { | 276 | { | ||
278 | QCryptographicHash hash(QCryptographicHash::Md5); | 277 | QCryptographicHash hash(QCryptographicHash::Md5); | ||
279 | hash.addData(QByteArray::number(m_conn->id())); | 278 | hash.addData(QByteArray::number(m_conn->id())); | ||
280 | hash.addData(m_edid.eisaId()); | 279 | hash.addData(m_edid.eisaId()); | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 336 | KConfigGroup group = kwinApp()->config()->group("EdidOverwrite").group(m_edid.eisaId().isEmpty() ? unknown : m_edid.eisaId()) | |||
338 | .group(m_edid.monitorName().isEmpty() ? unknown : m_edid.monitorName()) | 337 | .group(m_edid.monitorName().isEmpty() ? unknown : m_edid.monitorName()) | ||
339 | .group(m_edid.serialNumber().isEmpty() ? unknown : m_edid.serialNumber()); | 338 | .group(m_edid.serialNumber().isEmpty() ? unknown : m_edid.serialNumber()); | ||
340 | if (group.hasKey("PhysicalSize")) { | 339 | if (group.hasKey("PhysicalSize")) { | ||
341 | const QSize overwriteSize = group.readEntry("PhysicalSize", physicalSize); | 340 | const QSize overwriteSize = group.readEntry("PhysicalSize", physicalSize); | ||
342 | qCWarning(KWIN_DRM) << "Overwriting monitor physical size for" << m_edid.eisaId() << "/" << m_edid.monitorName() << "/" << m_edid.serialNumber() << " from " << physicalSize << "to " << overwriteSize; | 341 | qCWarning(KWIN_DRM) << "Overwriting monitor physical size for" << m_edid.eisaId() << "/" << m_edid.monitorName() << "/" << m_edid.serialNumber() << " from " << physicalSize << "to " << overwriteSize; | ||
343 | physicalSize = overwriteSize; | 342 | physicalSize = overwriteSize; | ||
344 | } | 343 | } | ||
345 | 344 | | |||
346 | initWaylandOutputDevice(model, manufacturer, m_uuid, physicalSize, modes); | 345 | initInterfaces(model, manufacturer, m_uuid, physicalSize, modes); | ||
347 | } | 346 | } | ||
348 | 347 | | |||
349 | bool DrmOutput::isCurrentMode(const drmModeModeInfo *mode) const | 348 | bool DrmOutput::isCurrentMode(const drmModeModeInfo *mode) const | ||
350 | { | 349 | { | ||
351 | return mode->clock == m_mode.clock | 350 | return mode->clock == m_mode.clock | ||
352 | && mode->hdisplay == m_mode.hdisplay | 351 | && mode->hdisplay == m_mode.hdisplay | ||
353 | && mode->hsync_start == m_mode.hsync_start | 352 | && mode->hsync_start == m_mode.hsync_start | ||
354 | && mode->hsync_end == m_mode.hsync_end | 353 | && mode->hsync_end == m_mode.hsync_end | ||
▲ Show 20 Lines • Show All 718 Lines • Show Last 20 Lines |