mt9e013: async power up sequence to decrease Lanuch2preview time
authorTao Jing <jing.tao@intel.com>
Fri, 13 Apr 2012 03:26:33 +0000 (11:26 +0800)
committerbuildbot <buildbot@intel.com>
Thu, 3 May 2012 20:12:04 +0000 (13:12 -0700)
commit1428b87c861f5e007fa1becd137f5a72d83badd0
tree99a9d1d470102fe5c6bf87d4448cb8033a76e54d
parentc0fe1e4ac09adc5babb2cf3f734f8d2e2a7c8d11
mt9e013: async power up sequence to decrease Lanuch2preview time

BZ: 32405

Currently power up time for mt9e013 takes about 130ms which blocks the v4l2 call
of S_INPUT, since sensor subdev call s_power is called from it. And hense impact
the overall lunch2preview performance.

This patch makes s_power subdev call create a workthread to do the
time-consuming power up procedure and return immediately, which will
not block the s_input and also let the power up procedure can be run
in parallel with other initializations. For other subdev calls that
access sensor hw and need sensor power up to be done, e.g.: s_mbus_fmt,
s_ctrl, g_ctrl, etc, it will check and wait for the power up workthread
to be finished.

Change-Id: I31ef1307c82f4a516aad78409b4881b2aa53469f
Signed-off-by: Tao Jing <jing.tao@intel.com>
Signed-off-by: ziyux.jiang <ziyux.jiang@intel.com>
Reviewed-on: http://android.intel.com:8080/44109
Reviewed-by: Bhat, Sheethal <sheethal.bhat@intel.com>
Reviewed-by: Wang, Wen W <wen.w.wang@intel.com>
Reviewed-by: Lampila, KalleX <kallex.lampila@intel.com>
Tested-by: Lampila, KalleX <kallex.lampila@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/mt9e013.c
drivers/media/video/mt9e013.h