From 56b34863843cd269697d5cba5a64596ca9278f78 Mon Sep 17 00:00:00 2001 From: Yash Upadhyay Date: Thu, 8 Jul 2021 14:59:28 +0530 Subject: [PATCH] msm: camera: isp: CSID Tasklet stop sequence Handle race for tasklet stop. Changed the sequence of tasklet stop call to avoid unclocked register accesses on tasklet stop/flush. CRs-Fixed: 3010894 Change-Id: Ieec9f20db127b2bebec0bb40ec437b4eb3d3d9dd Signed-off-by: Yash Upadhyay --- .../cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c | 3 ++- .../cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c index 930e1eb2687b..c25bedb07598 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c @@ -1589,12 +1589,13 @@ static int cam_ife_csid_disable_hw(struct cam_ife_csid_hw *csid_hw) cam_io_w_mb(0, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_top_irq_mask_addr); + cam_tasklet_stop(csid_hw->tasklet); + rc = cam_ife_csid_disable_soc_resources(soc_info); if (rc) CAM_ERR(CAM_ISP, "CSID:%d Disable CSID SOC failed", csid_hw->hw_intf->hw_idx); - cam_tasklet_stop(csid_hw->tasklet); spin_lock_irqsave(&csid_hw->lock_state, flags); csid_hw->device_enabled = 0; spin_unlock_irqrestore(&csid_hw->lock_state, flags); diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.c index 8dd9f0f0337e..7c86db7b8912 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.c @@ -1165,12 +1165,13 @@ static int cam_tfe_csid_disable_hw(struct cam_tfe_csid_hw *csid_hw) cam_io_w_mb(0, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_top_irq_mask_addr); + cam_tasklet_stop(csid_hw->tasklet); + rc = cam_tfe_csid_disable_soc_resources(soc_info); if (rc) CAM_ERR(CAM_ISP, "CSID:%d Disable CSID SOC failed", csid_hw->hw_intf->hw_idx); - cam_tasklet_stop(csid_hw->tasklet); spin_lock_irqsave(&csid_hw->spin_lock, flags); csid_hw->device_enabled = 0; spin_unlock_irqrestore(&csid_hw->spin_lock, flags);