[PORT FROM R2] atomisp: avoid concurrent access of hrt_isp_css_mm_set_user_ptr()
authorDavid Cohen <david.a.cohen@intel.com>
Wed, 19 Oct 2011 12:41:04 +0000 (15:41 +0300)
committerbuildbot <buildbot@intel.com>
Mon, 19 Dec 2011 13:27:32 +0000 (05:27 -0800)
commit1e691b71e028c10661de813534a719ec56134895
treedb0c4680d20c4d34db29f26a135f5aee3fe26ab0
parent2cb9265ca065d33c0ebda499ab06c8c5a7325b83
[PORT FROM R2] atomisp: avoid concurrent access of hrt_isp_css_mm_set_user_ptr()

BZ: 17272

Function hrt_isp_css_mm_alloc() depends on global variables set by
hrt_isp_css_mm_set_user_ptr() which creates need to use both functions
in sequence by same user.
As accel API uses it concurrently with atomisp_qbuf(), it causes a
possible racing condition between both.

This patch creates a new way to call hrt_isp_css_mm_alloc() without needing
to set global variables. Accel API makes use of this new way avoiding the
possible racing condition.

Change-Id: If8f4c1bb60e647b1973856ebdd1ea3a7e31648b6
Orig-Change-Id: I16e59afb336c395392fa3fca899d58a690875eb2
Signed-off-by: David Cohen <david.a.cohen@intel.com>
Reviewed-on: http://android.intel.com:8080/23196
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: Gupta, Lokesh <lokesh.gupta@intel.com>
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: Wang, Wen W <wen.w.wang@intel.com>
Reviewed-by: Le Thenaff, Erwan <erwan.le.thenaff@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Reviewed-on: http://android.intel.com:8080/27990
Reviewed-by: Tuominen, TeemuX <teemux.tuominen@intel.com>
drivers/media/video/atomisp/atomisp_cmd.c
drivers/media/video/atomisp/css/hrt/hive_isp_css_mm_hrt.h
drivers/media/video/atomisp/hrt/hive_isp_css_mm_hrt.c