sm6375-common: power-libperfmgr: ADPF: avoid to call close() twice

To get rid of error logs, avoid to call close() twice.

07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2585 in TidRefCountMap
07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2586 in TidRefCountMap
07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2031 in TidRefCountMap
07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2585 in TidRefCountMap

Bug: 194775170
Test: build and check log.
Change-Id: I91adf907b837382f68935b9054e19465a499049c
This commit is contained in:
Jimmy Shiu 2024-07-18 12:56:42 +05:30 committed by Anand S
commit a0257b68a4
No known key found for this signature in database
GPG key ID: 3B2983FA448B3D61
2 changed files with 6 additions and 1 deletions

View file

@ -108,6 +108,7 @@ class PowerHintSession : public BnPowerHintSession {
sp<MessageHandler> mPowerManagerHandler;
std::mutex mLock;
const nanoseconds kAdpfRate;
std::atomic<bool> mSessionClosed = false;
};
} // namespace pixel