From 82ee45360e1de6d7dccb81fa8a03a135d9b5a3cc Mon Sep 17 00:00:00 2001 From: Alok Pandey Date: Tue, 30 Jul 2019 04:11:17 -0700 Subject: [PATCH] Revert "msm: camera: icp: lock before updating clock status" This reverts commit 6094f6654bd6ddc7f6df54b19cb8e6697bf3111c. The change introduces a lock around a code that can cause sleep. It results in abnormal operation of camera functionality. Reverting this change will lead to original problem of stability. That need to be addressed. Change-Id: I3899d6992350bc466e89ee1ca1834a8a7fbd0269 Signed-off-by: Alok Pandey --- drivers/cam_icp/icp_hw/bps_hw/bps_core.c | 5 ----- drivers/cam_icp/icp_hw/ipe_hw/ipe_core.c | 5 ----- 2 files changed, 10 deletions(-) diff --git a/drivers/cam_icp/icp_hw/bps_hw/bps_core.c b/drivers/cam_icp/icp_hw/bps_hw/bps_core.c index 7deea1c94d84..73075a4ec379 100644 --- a/drivers/cam_icp/icp_hw/bps_hw/bps_core.c +++ b/drivers/cam_icp/icp_hw/bps_hw/bps_core.c @@ -306,7 +306,6 @@ int cam_bps_process_cmd(void *device_priv, uint32_t cmd_type, struct cam_bps_device_core_info *core_info = NULL; struct cam_bps_device_hw_info *hw_info = NULL; int rc = 0; - unsigned long flags; if (!device_priv) { CAM_ERR(CAM_ICP, "Invalid arguments"); @@ -396,16 +395,12 @@ int cam_bps_process_cmd(void *device_priv, uint32_t cmd_type, } break; case CAM_ICP_BPS_CMD_DISABLE_CLK: - spin_lock_irqsave(&bps_dev->hw_lock, flags); if (core_info->clk_enable == true) cam_bps_toggle_clk(soc_info, false); core_info->clk_enable = false; - spin_unlock_irqrestore(&bps_dev->hw_lock, flags); break; case CAM_ICP_BPS_CMD_RESET: - spin_lock_irqsave(&bps_dev->hw_lock, flags); rc = cam_bps_cmd_reset(soc_info, core_info); - spin_unlock_irqrestore(&bps_dev->hw_lock, flags); break; default: CAM_ERR(CAM_ICP, "Invalid Cmd Type:%u", cmd_type); diff --git a/drivers/cam_icp/icp_hw/ipe_hw/ipe_core.c b/drivers/cam_icp/icp_hw/ipe_hw/ipe_core.c index 614c748f0d85..82d0ebe54cc4 100644 --- a/drivers/cam_icp/icp_hw/ipe_hw/ipe_core.c +++ b/drivers/cam_icp/icp_hw/ipe_hw/ipe_core.c @@ -305,7 +305,6 @@ int cam_ipe_process_cmd(void *device_priv, uint32_t cmd_type, struct cam_ipe_device_core_info *core_info = NULL; struct cam_ipe_device_hw_info *hw_info = NULL; int rc = 0; - unsigned long flags; if (!device_priv) { CAM_ERR(CAM_ICP, "Invalid arguments"); @@ -390,16 +389,12 @@ int cam_ipe_process_cmd(void *device_priv, uint32_t cmd_type, } break; case CAM_ICP_IPE_CMD_DISABLE_CLK: - spin_lock_irqsave(&ipe_dev->hw_lock, flags); if (core_info->clk_enable == true) cam_ipe_toggle_clk(soc_info, false); core_info->clk_enable = false; - spin_unlock_irqrestore(&ipe_dev->hw_lock, flags); break; case CAM_ICP_IPE_CMD_RESET: - spin_lock_irqsave(&ipe_dev->hw_lock, flags); rc = cam_ipe_cmd_reset(soc_info, core_info); - spin_unlock_irqrestore(&ipe_dev->hw_lock, flags); break; default: CAM_ERR(CAM_ICP, "Invalid Cmd Type:%u", cmd_type);