hwc: Fix locking.
Remove the unnecessary blank lock, mdp comp lock, secure lock.
Rename the ext lock to a more appropriate draw lock.
The mdp comp lock is at an incorrect place and causes unwanted
objects to show up in dumpsys, since configDone hasnt cleaned
them up yet.
dump(), blank(), draw() should all acquire a common lock.
draw() includes prepare() and set().
Change-Id: I595547dd5a393a8af6cd8c9297d50793b715e658
diff --git a/libhwcomposer/hwc_qclient.cpp b/libhwcomposer/hwc_qclient.cpp
index 5d7d4d3..12a9f32 100644
--- a/libhwcomposer/hwc_qclient.cpp
+++ b/libhwcomposer/hwc_qclient.cpp
@@ -74,7 +74,7 @@
}
void QClient::securing(uint32_t startEnd) {
- Locker::Autolock _sl(mHwcContext->mSecureLock);
+ Locker::Autolock _sl(mHwcContext->mDrawLock);
//The only way to make this class in this process subscribe to media
//player's death.
IMediaDeathNotifier::getMediaPlayerService();
@@ -88,7 +88,7 @@
}
void QClient::unsecuring(uint32_t startEnd) {
- Locker::Autolock _sl(mHwcContext->mSecureLock);
+ Locker::Autolock _sl(mHwcContext->mDrawLock);
mHwcContext->mSecuring = startEnd;
//We're done unsecuring
if(startEnd == IQService::END)
@@ -98,7 +98,7 @@
}
void QClient::MPDeathNotifier::died() {
- Locker::Autolock _sl(mHwcContext->mSecureLock);
+ Locker::Autolock _sl(mHwcContext->mDrawLock);
ALOGD_IF(QCLIENT_DEBUG, "Media Player died");
mHwcContext->mSecuring = false;
mHwcContext->mSecureMode = false;