[platforms/hwcomposer] Support for hwcomposer 1.4 and 1.5 version
ClosedPublic

Authored by bshah on Dec 15 2016, 2:11 PM.

Details

Summary

HWcomposer version 1.4 introduced setPowerMode, which replaces the
blank(). This adds support for it. There are various code paths
possible,

  • If KWin is built against hwcomposer 1.3 headers, then setPowerMode

code is not compiled in, and it will use blank to turn display off.

  • If KWin is built against hwcomposer 1.4 headers, it will have

setPowerMode code path compiled in. It will be used only on devices with
1.4 and 1.5 version of hwcomposer.

This is slightly insane, because Android can report hwcomposer 1.5 even
when headers are of 1.4 version..

Test Plan

Tested this on Nexus 5.X which reports 1.5 version of hwcomposer

Diff Detail

Repository
R108 KWin
Branch
support-hwc-1.5
Lint
No Linters Available
Unit
No Unit Test Coverage
bshah retitled this revision from to [platforms/hwcomposer] Support for hwcomposer 1.4 and 1.5 version.Dec 15 2016, 2:11 PM
bshah updated this object.
bshah edited the test plan for this revision. (Show Details)
bshah added reviewers: Plasma, graesslin.
Restricted Application added a project: KWin. · View Herald TranscriptDec 15 2016, 2:11 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
graesslin added inline comments.Dec 15 2016, 4:56 PM
plugins/platforms/hwcomposer/hwcomposer_backend.cpp
321

hmm that doesn' t look really forward compatible. Can we have something like

#if VERSION > 1_4

?

bshah added inline comments.Dec 15 2016, 5:00 PM
plugins/platforms/hwcomposer/hwcomposer_backend.cpp
321

I didn't get you on how it is not forward compatible?

bshah added inline comments.Dec 15 2016, 5:02 PM
plugins/platforms/hwcomposer/hwcomposer_backend.cpp
321

Oh actually nevermind. I got wrong line in email so was confused.. so idea here is you'll need to check 1.4 and 1.5 as there is also 2.0 and it is not compatible with this code

graesslin accepted this revision.Dec 15 2016, 5:25 PM
This revision is now accepted and ready to land.Dec 15 2016, 5:25 PM
This revision was automatically updated to reflect the committed changes.