OSDN Git Service

sf: Fix incorrect state reporting in dumpsys
authorManoj Kumar AVM <manojavm@codeaurora.org>
Thu, 11 Jun 2015 21:18:14 +0000 (14:18 -0700)
committerDan Stoza <stoza@google.com>
Fri, 12 Jun 2015 16:48:07 +0000 (09:48 -0700)
commite04e4edcd1a852058775caa34cf73e2c20dc1066
treeca4d0ba432afe2c7c5c4724147759ada1440fb46
parent23e16bb5dae277cd20a739ca56553ae931c43ccf
sf: Fix incorrect state reporting in dumpsys

Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666
(cherry picked from commit e54506b81a3b81683056ad48294e37d6b4b4e36b)
services/surfaceflinger/DisplayHardware/HWComposer.cpp
services/surfaceflinger/DisplayHardware/HWComposer.h