OSDN Git Service

Revert "surfaceflinger: work around dumpsys lockup"
authorChia-I Wu <olv@google.com>
Thu, 11 May 2017 23:06:07 +0000 (16:06 -0700)
committerChia-I Wu <olv@google.com>
Fri, 12 May 2017 15:47:56 +0000 (08:47 -0700)
This reverts commit 843460d1d8ced54ed224cff2b3fad703b6ea98c4.

Bug: 38183197
Test: manual while running dumpDebugInfo continuously in the
      background
Change-Id: Ife3fb2970f58b8c8049bbe878c6a7728d1299d57

services/surfaceflinger/DisplayHardware/HWComposer.cpp
services/surfaceflinger/DisplayHardware/HWComposer.h

index 40979c9..04ab78f 100644 (file)
@@ -69,8 +69,7 @@ HWComposer::HWComposer(bool useVrComposer)
       mCBContext(),
       mEventHandler(nullptr),
       mVSyncCounts(),
-      mRemainingHwcVirtualDisplays(0),
-      mDumpMayLockUp(false)
+      mRemainingHwcVirtualDisplays(0)
 {
     for (size_t i=0 ; i<HWC_NUM_PHYSICAL_DISPLAY_TYPES ; i++) {
         mLastHwVSync[i] = 0;
@@ -494,8 +493,6 @@ status_t HWComposer::prepare(DisplayDevice& displayDevice) {
         return NO_ERROR;
     }
 
-    mDumpMayLockUp = true;
-
     uint32_t numTypes = 0;
     uint32_t numRequests = 0;
     auto error = hwcDisplay->validate(&numTypes, &numRequests);
@@ -636,9 +633,6 @@ status_t HWComposer::presentAndGetReleaseFences(int32_t displayId) {
     auto& displayData = mDisplayData[displayId];
     auto& hwcDisplay = displayData.hwcDisplay;
     auto error = hwcDisplay->present(&displayData.lastPresentFence);
-
-    mDumpMayLockUp = false;
-
     if (error != HWC2::Error::None) {
         ALOGE("presentAndGetReleaseFences: failed for display %d: %s (%d)",
               displayId, to_string(error).c_str(), static_cast<int32_t>(error));
@@ -884,11 +878,6 @@ bool HWComposer::isUsingVrComposer() const {
 }
 
 void HWComposer::dump(String8& result) const {
-    if (mDumpMayLockUp) {
-        result.append("HWComposer dump skipped because present in progress");
-        return;
-    }
-
     // TODO: In order to provide a dump equivalent to HWC1, we need to shadow
     // all the state going into the layers. This is probably better done in
     // Layer itself, but it's going to take a bit of work to get there.
index 78d0307..631af14 100644 (file)
@@ -224,9 +224,6 @@ private:
 
     // thread-safe
     mutable Mutex mVsyncLock;
-
-    // XXX temporary workaround for b/35806047
-    mutable std::atomic<bool> mDumpMayLockUp;
 };
 
 // ---------------------------------------------------------------------------