backends/drm: drop explicit modifiers completely if no output config works

Removing modifiers one by one creates a huge amount of combinations that
can make KWin hang for a long time in some cases. Instead of doing that,
leave it up to Mesa to pick a modifier when a setup doesn't work, which
will generally result in the least amount of bandwidth used and should be
able to power all output combinations.
This commit is contained in:
Xaver Hugl 2022-09-02 13:40:58 +02:00
parent 6bb4ebdf04
commit f70caec4b3

View file

@ -504,11 +504,12 @@ bool DrmPipeline::pruneModifier()
return false;
}
auto &modifiers = m_pending.formats[m_pending.layer->currentBuffer()->buffer()->format()];
if (modifiers.count() <= 1) {
if (modifiers.empty()) {
return false;
} else {
modifiers.clear();
return true;
}
modifiers.removeOne(m_pending.layer->currentBuffer()->buffer()->modifier());
return true;
}
bool DrmPipeline::needsModeset() const