[platforms/drm] Add hardware transformation API
ClosedPublic

Authored by romangg on Dec 11 2019, 7:37 PM.

Details

Summary

Planes might be able to do transformations without compositing required.
When changing the current transform try this with the primary plane. If this
fails fall back to no transformation at all through hardware and communicate
the fact and other information through some getters.

Also adds an environment variable to never do hardware transformations.

Test Plan

Compiles.

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.Dec 11 2019, 7:37 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 11 2019, 7:37 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Dec 11 2019, 7:37 PM
romangg edited the summary of this revision. (Show Details)Dec 11 2019, 7:38 PM
zzag added a subscriber: zzag.Dec 11 2019, 9:47 PM
zzag added inline comments.
plugins/platforms/drm/drm_output.cpp
655

Use full name, e.g. OutputTransform.

704

Please omit "rotation" in the environment variable name and use something more generic, e.g. "output transforms," etc.

plugins/platforms/drm/drm_output.h
92

Rename it to supportsHardwareTransforms.

romangg added inline comments.Jan 7 2020, 3:49 PM
plugins/platforms/drm/drm_output.cpp
704

How about KWIN_DRM_OUTPUT_SW_ONLY_TRANSFORM?

plugins/platforms/drm/drm_output.h
92

"supports" would indicate a general availability or not, but we are talking about the current state. So either the hardware transforms at the moment or not.

romangg updated this revision to Diff 73002.Jan 7 2020, 4:29 PM
romangg marked 3 inline comments as done.
  • Fix names
zzag accepted this revision.Jan 8 2020, 10:10 AM
This revision is now accepted and ready to land.Jan 8 2020, 10:10 AM
This revision was automatically updated to reflect the committed changes.