support for overlay planes on single output systems

This adds support for making use of hardware overlay planes, in order to avoid compositing whenever possible. With games in windowed mode, this improves performance and latency, and with videos it can drastically lower power usage.

This is limited to when only a single output per GPU is enabled, to avoid having to deal with issues like GPU-wide bandwidth restrictions and switching drm planes between outputs without modesets. That limitation will be lifted later on.

This will need a lot of testing! So far, everything seems to work fine on my AMD laptop and desktop, but the other GPU vendors need to be covered as well.

Note that overlay planes currently are only used if you don't have any color profile or HDR enabled. To change that, we need !6600 (merged). On AMD, videos also currently can't be put on overlay planes, because the overlay planes are missing COLOR_ENCODING and COLOR_RANGE properties.

This is based on !7923 (merged), !7922 (merged) and !7750 (merged), they need to be merged before this can go in.

cc #282


Test plan:

  • setup: only one enabled display (per GPU), HDR disabled, night light disabled, color profile set to "None", rounded corners disabled for the window decoration
  • on AMD, you can do echo 1 | sudo tee /sys/kernel/debug/dri/1/amdgpu_dm_visual_confirm to have it show the planes (if you're interested in seeing what this MR changes)
  • test a video playing in Firefox (windowed mode), and do some normal things on the system with
    • normal rotation
    • 90° rotation
    • 180° rotation
    • 270° rotation
    • the nested Wayland backend: dbus-run-session kwin_wayland -- plasmashell
Edited by Xaver Hugl

Merge request reports

Loading