[platforms/drm] Rework enablement and dpms switching
ClosedPublic

Authored by romangg on Aug 31 2019, 8:43 AM.

Details

Summary

This patch further refines output management.

We go now through AbstractWaylandOutput virtual functions to enable and
disable outputs.

Dpms changes and enablement switches use separate code paths at start in the
Drm backend code since they are similar but not the directly same. Common code
is shared though, functions are renamed accordingly.

Asserts have been put in place to better understand and check the control
flow. A seemingly unnecessary call to DrmOutput::pageFlipped on reactivation
after Vt switch has been removed to allow for that.

In future patches we need to look additionally at the legacy mode switching
code path which was and is still not working and better handling of the
current monitor Dpms state. For example a monitor being switched off is not
properly acted on and the workspace still expanded.

Test Plan

With one and two monitors:

  • Dpms off/on
  • Vt switches
  • Screen disable/enable

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Aug 31 2019, 8:43 AM
Restricted Application added a project: KWin. · View Herald TranscriptAug 31 2019, 8:43 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Aug 31 2019, 8:43 AM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 5 2019, 3:36 PM
This revision was automatically updated to reflect the committed changes.