This merge request refactors the mode setting abstraction (MetaKms) and finally adds support for atomic mode setting.
Very high level changes are:
- The "impl" backend is changed to be per device
MetaKmsImplDeviceSimple more or less.
- Legacy mode setting (
MetaKmsImplDeviceSimple) is made to even more look like atomic mode setting when used externally.
Everything that aims to manipulate the drm/kms state is done as part of the frame dispatch. E.g. gamma and cursor plane updates don't happen outside of a frame dispatch.
- When doing reconfiguring the monitor layout, resolutions, etc, all CRTCs of a single device are updated using a single update.
Reconfiguring one CRTC might implicitly invalidate the state of other CRTCs, meaning we'd end up getting EBUSY when trying to commit. This is handled by updating all CRTCs of a device using one update, i.e. one atomic commit, synchronously.
- VMs are not using atomic mode setting
Virtual machines behave badly with atomic mode setting due to the lack of cursor hot spots in the cursor planes. So until that's fixed, they will be using legacy mode setting APIs.
Some things are relatively untested so far, and requires verification: