Browse Source

msm: camera: icp: protect timer stop with hw mutex

To avoid concurrent access to the device timers while
stopping them, keep the stop call protected with hw
mutex.

CRs-Fixed: 3080397
Change-Id: If0a5226536e3a3c14738811965511225d1a96f08
Signed-off-by: Tejas Prajapati <[email protected]>
Tejas Prajapati 3 năm trước cách đây
mục cha
commit
6f8e74a1b9
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

+ 1 - 1
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

@@ -6034,10 +6034,10 @@ static int cam_icp_mgr_release_hw(void *hw_mgr_priv, void *release_hw_args)
 		cam_icp_hw_mgr_reset_clk_info(hw_mgr);
 		rc = cam_ipe_bps_deint(hw_mgr);
 	}
-	mutex_unlock(&hw_mgr->hw_mgr_mutex);
 
 	if ((!hw_mgr->bps_ctxt_cnt || !hw_mgr->ipe_ctxt_cnt))
 		cam_icp_device_timer_stop(hw_mgr);
+	mutex_unlock(&hw_mgr->hw_mgr_mutex);
 
 	CAM_DBG(CAM_ICP, "Release done for ctx_id %d", ctx_id);
 	return rc;