atomisp: lock isp_lock when access to ACC FW container
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 24 Feb 2012 14:17:58 +0000 (16:17 +0200)
committerbuildbot <buildbot@intel.com>
Wed, 14 Mar 2012 15:49:58 +0000 (08:49 -0700)
commit6821b650fc65df5b8fb9c396543dd458d8a4bed6
tree7b065209c8681fa1899525b2dc2ede3d6b7cb457
parent9f9590fbd24c64cb5045c3198d6a4e5bd18982ba
atomisp: lock isp_lock when access to ACC FW container

BZ: 25527

This patch does following things.

It protects the ACC FW container by setting isp_lock everywhere. Unfortunately
we need to hold a global lock (isp_lock) during access and handling the ACC FW
item, because __acc_fw_free() invalidates a FW as well. In the future we need
to split container lock and the item locks.

It moves lock outside atomisp_acc_fw_alloc() and renames it to
__acc_fw_alloc().

Change-Id: If8ce9cedf381954d0dffd566c325f5ca5592e79b
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-on: http://android.intel.com:8080/36869
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Reviewed-by: Toivonen, Tuukka <tuukka.toivonen@intel.com>
Reviewed-by: Shevchenko, Andriy <andriy.shevchenko@intel.com>
Reviewed-by: Cohen, David A <david.a.cohen@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/atomisp/atomisp_cmd.c