Skip to content

backends/drm: fix modifiers and enable them by default

Xaver Hugl requested to merge work/smart-modifiers into master

When explicit modifiers are used, it can happen that Mesa chooses modifiers that make the display hardware hit bandwidth limits. In that case, atomic tests fail and the outputs don't work, or KWin may even crash (at least before !2233 (merged)).

In order to work around that, DrmGpu now blacklists the used modifier whenever an atomic test fails, and tries to find a working combination of outputs and modifiers.

There is one caveat to this: It's now a lot more combinations to test, and it also includes lots of (de)allocations. As a rough estimation, finding a working setup could in the worst case take a few seconds on some systems (with 6 displays attached to one GPU). I don't expect it to be a problem in practice though.

Merge request reports