summaryrefslogtreecommitdiffstats
path: root/camera/inc
diff options
context:
space:
mode:
authorEmilian Peev <epeev@mm-sol.com>2012-08-24 12:44:18 +0300
committerDaniel Levin <dendy@ti.com>2012-11-26 20:07:10 +0200
commitf1340200e44a8a049233fdff3b1cb039dd62535c (patch)
treebc27e7faf4273032155445c65203afcbbbfdb44b /camera/inc
parentd5d5df1e8575039a42125a64b279b38cd17a4e44 (diff)
downloadhardware_ti_omap4-f1340200e44a8a049233fdff3b1cb039dd62535c.zip
hardware_ti_omap4-f1340200e44a8a049233fdff3b1cb039dd62535c.tar.gz
hardware_ti_omap4-f1340200e44a8a049233fdff3b1cb039dd62535c.tar.bz2
CameraHal: Avoid deadlocks when re-using a tapout
- Locking inside 'takePicture()' is sometimes possible when re-using the same SurfaceTexture. This is due to the blocking nature of the dequeue call inside 'BufferSourceAdapter::handleFrameReturn()' which does acquire 'mLock' upon entering. The solution is to handle this particular case by reusing the buffers that were previously allocated and avoiding any calls to the Adapter which might try to lock 'mLock'. Change-Id: I6c4e49fd84df2659c0466b6f89c88916f93a6b8d Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
Diffstat (limited to 'camera/inc')
-rw-r--r--camera/inc/CameraHal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/camera/inc/CameraHal.h b/camera/inc/CameraHal.h
index d750270..1aa7b7f 100644
--- a/camera/inc/CameraHal.h
+++ b/camera/inc/CameraHal.h
@@ -1460,6 +1460,7 @@ private:
uint32_t *mImageOffsets;
int mImageFd;
int mImageLength;
+ unsigned int mImageCount;
CameraBuffer *mPreviewBuffers;
uint32_t *mPreviewOffsets;
int mPreviewLength;