backends/drm: also check for properties in DrmPipeline::needsModeset

Otherwise we may be missing situations where a modeset is needed

BUG: 455814
This commit is contained in:
Xaver Hugl 2022-07-02 18:15:45 +02:00
parent 8f18dc5b7d
commit 0d302d5c66

View file

@ -451,6 +451,20 @@ bool DrmPipeline::pruneModifier()
bool DrmPipeline::needsModeset() const
{
if (m_connector->needsModeset()) {
return true;
}
if (m_pending.crtc) {
if (m_pending.crtc->needsModeset()) {
return true;
}
if (auto primary = m_pending.crtc->primaryPlane(); primary && primary->needsModeset()) {
return true;
}
if (auto cursor = m_pending.crtc->cursorPlane(); cursor && cursor->needsModeset()) {
return true;
}
}
return m_pending.crtc != m_current.crtc
|| m_pending.active != m_current.active
|| m_pending.mode != m_current.mode