Merge "msm: camera: icp: lock before updating clock status" into camera-kernel.lnx.1.0
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
93a2d068ae
@@ -306,6 +306,7 @@ 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_core_info *core_info = NULL;
|
||||||
struct cam_bps_device_hw_info *hw_info = NULL;
|
struct cam_bps_device_hw_info *hw_info = NULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
if (!device_priv) {
|
if (!device_priv) {
|
||||||
CAM_ERR(CAM_ICP, "Invalid arguments");
|
CAM_ERR(CAM_ICP, "Invalid arguments");
|
||||||
@@ -395,12 +396,16 @@ int cam_bps_process_cmd(void *device_priv, uint32_t cmd_type,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CAM_ICP_BPS_CMD_DISABLE_CLK:
|
case CAM_ICP_BPS_CMD_DISABLE_CLK:
|
||||||
|
spin_lock_irqsave(&bps_dev->hw_lock, flags);
|
||||||
if (core_info->clk_enable == true)
|
if (core_info->clk_enable == true)
|
||||||
cam_bps_toggle_clk(soc_info, false);
|
cam_bps_toggle_clk(soc_info, false);
|
||||||
core_info->clk_enable = false;
|
core_info->clk_enable = false;
|
||||||
|
spin_unlock_irqrestore(&bps_dev->hw_lock, flags);
|
||||||
break;
|
break;
|
||||||
case CAM_ICP_BPS_CMD_RESET:
|
case CAM_ICP_BPS_CMD_RESET:
|
||||||
|
spin_lock_irqsave(&bps_dev->hw_lock, flags);
|
||||||
rc = cam_bps_cmd_reset(soc_info, core_info);
|
rc = cam_bps_cmd_reset(soc_info, core_info);
|
||||||
|
spin_unlock_irqrestore(&bps_dev->hw_lock, flags);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CAM_ERR(CAM_ICP, "Invalid Cmd Type:%u", cmd_type);
|
CAM_ERR(CAM_ICP, "Invalid Cmd Type:%u", cmd_type);
|
||||||
|
@@ -305,6 +305,7 @@ 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_core_info *core_info = NULL;
|
||||||
struct cam_ipe_device_hw_info *hw_info = NULL;
|
struct cam_ipe_device_hw_info *hw_info = NULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
if (!device_priv) {
|
if (!device_priv) {
|
||||||
CAM_ERR(CAM_ICP, "Invalid arguments");
|
CAM_ERR(CAM_ICP, "Invalid arguments");
|
||||||
@@ -389,12 +390,16 @@ int cam_ipe_process_cmd(void *device_priv, uint32_t cmd_type,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CAM_ICP_IPE_CMD_DISABLE_CLK:
|
case CAM_ICP_IPE_CMD_DISABLE_CLK:
|
||||||
|
spin_lock_irqsave(&ipe_dev->hw_lock, flags);
|
||||||
if (core_info->clk_enable == true)
|
if (core_info->clk_enable == true)
|
||||||
cam_ipe_toggle_clk(soc_info, false);
|
cam_ipe_toggle_clk(soc_info, false);
|
||||||
core_info->clk_enable = false;
|
core_info->clk_enable = false;
|
||||||
|
spin_unlock_irqrestore(&ipe_dev->hw_lock, flags);
|
||||||
break;
|
break;
|
||||||
case CAM_ICP_IPE_CMD_RESET:
|
case CAM_ICP_IPE_CMD_RESET:
|
||||||
|
spin_lock_irqsave(&ipe_dev->hw_lock, flags);
|
||||||
rc = cam_ipe_cmd_reset(soc_info, core_info);
|
rc = cam_ipe_cmd_reset(soc_info, core_info);
|
||||||
|
spin_unlock_irqrestore(&ipe_dev->hw_lock, flags);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CAM_ERR(CAM_ICP, "Invalid Cmd Type:%u", cmd_type);
|
CAM_ERR(CAM_ICP, "Invalid Cmd Type:%u", cmd_type);
|
||||||
|
Reference in New Issue
Block a user