Skip to content

Atomic mode setting support

Jonas Ådahl requested to merge jadahl/mutter:wip/kms-atomic into master

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

MetaKmsImplSimple became 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:

  • Check driver support
    • intel
    • nouveau
    • amdgpu
    • EGLStream backend (can only use legacy)
    • ... and others
  • Hybrid graphics
  • DPMS (test utility: gnome-set-power-save.sh)
  • Gamma (test utility: gnome-gamma.py)
Edited by Jonas Ådahl

Merge request reports