[platforms/drm] Add hardware transformation API
AcceptedPublic

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

Details

Reviewers
zzag
Group Reviewers
KWin
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
Branch
hardware-rotation-api
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 20762
Build 20780: arc lint + arc unit
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
654

Use full name, e.g. OutputTransform.

703

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.Tue, Jan 7, 3:49 PM
plugins/platforms/drm/drm_output.cpp
703

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.Tue, Jan 7, 4:29 PM
romangg marked 3 inline comments as done.
  • Fix names
zzag accepted this revision.Wed, Jan 8, 10:10 AM
This revision is now accepted and ready to land.Wed, Jan 8, 10:10 AM