Fix non-atomic output init
Summary: The initial blank needs to happen after the output device has been initialized to get the current mode size. Also we can't assert in legacy mode on the page flip pending since a page flip can also be the result of a CRTC blank using a different. BUG: 412684 FIXED-IN: 5.17.1 Test Plan: Full Plasma session Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D24829
This commit is contained in:
parent
982fefd389
commit
0d67a0b48a
1 changed files with 9 additions and 3 deletions
|
@ -252,8 +252,6 @@ bool DrmOutput::init(drmModeConnector *connector)
|
|||
if (!initPrimaryPlane()) {
|
||||
return false;
|
||||
}
|
||||
} else if (!m_crtc->blank()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setInternal(connector->connector_type == DRM_MODE_CONNECTOR_LVDS || connector->connector_type == DRM_MODE_CONNECTOR_eDP);
|
||||
|
@ -268,6 +266,12 @@ bool DrmOutput::init(drmModeConnector *connector)
|
|||
}
|
||||
|
||||
initOutputDevice(connector);
|
||||
|
||||
if (!m_backend->atomicModeSetting() && !m_crtc->blank()) {
|
||||
// We use legacy mode and the initial output blank failed.
|
||||
return false;
|
||||
}
|
||||
|
||||
updateDpms(KWayland::Server::OutputInterface::DpmsMode::On);
|
||||
return true;
|
||||
}
|
||||
|
@ -745,8 +749,10 @@ void DrmOutput::setWaylandMode()
|
|||
|
||||
void DrmOutput::pageFlipped()
|
||||
{
|
||||
Q_ASSERT(m_pageFlipPending);
|
||||
// In legacy mode we might get a page flip through a blank.
|
||||
Q_ASSERT(m_pageFlipPending || !m_backend->atomicModeSetting());
|
||||
m_pageFlipPending = false;
|
||||
|
||||
if (m_deleted) {
|
||||
deleteLater();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue