Loading drivers/media/platform/msm/camera/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_core.c +5 −6 Original line number Original line Diff line number Diff line Loading @@ -857,7 +857,8 @@ int cam_lrme_hw_stop(void *hw_priv, void *hw_stop_args, uint32_t arg_size) mutex_lock(&lrme_hw->hw_mutex); mutex_lock(&lrme_hw->hw_mutex); if (lrme_hw->open_count == 0) { if (lrme_hw->open_count == 0 || lrme_hw->hw_state == CAM_HW_STATE_POWER_DOWN) { mutex_unlock(&lrme_hw->hw_mutex); mutex_unlock(&lrme_hw->hw_mutex); CAM_ERR(CAM_LRME, "Error Unbalanced stop"); CAM_ERR(CAM_LRME, "Error Unbalanced stop"); return -EINVAL; return -EINVAL; Loading Loading @@ -886,10 +887,8 @@ int cam_lrme_hw_stop(void *hw_priv, void *hw_stop_args, uint32_t arg_size) } } rc = cam_lrme_soc_disable_resources(lrme_hw); rc = cam_lrme_soc_disable_resources(lrme_hw); if (rc) { if (rc) CAM_ERR(CAM_LRME, "Failed in Disable SOC, rc=%d", rc); CAM_ERR(CAM_LRME, "Failed in Disable SOC, rc=%d", rc); goto unlock; } lrme_hw->hw_state = CAM_HW_STATE_POWER_DOWN; lrme_hw->hw_state = CAM_HW_STATE_POWER_DOWN; if (lrme_core->state == CAM_LRME_CORE_STATE_IDLE) { if (lrme_core->state == CAM_LRME_CORE_STATE_IDLE) { Loading Loading @@ -1051,9 +1050,9 @@ int cam_lrme_hw_flush(void *hw_priv, void *hw_flush_args, uint32_t arg_size) if (lrme_core->state != CAM_LRME_CORE_STATE_PROCESSING && if (lrme_core->state != CAM_LRME_CORE_STATE_PROCESSING && lrme_core->state != CAM_LRME_CORE_STATE_REQ_PENDING && lrme_core->state != CAM_LRME_CORE_STATE_REQ_PENDING && lrme_core->state == CAM_LRME_CORE_STATE_REQ_PROC_PEND) { lrme_core->state != CAM_LRME_CORE_STATE_REQ_PROC_PEND) { mutex_unlock(&lrme_hw->hw_mutex); mutex_unlock(&lrme_hw->hw_mutex); CAM_DBG(CAM_LRME, "Stop not needed in %d state", CAM_DBG(CAM_LRME, "Flush is not needed in %d state", lrme_core->state); lrme_core->state); return 0; return 0; } } Loading Loading
drivers/media/platform/msm/camera/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_core.c +5 −6 Original line number Original line Diff line number Diff line Loading @@ -857,7 +857,8 @@ int cam_lrme_hw_stop(void *hw_priv, void *hw_stop_args, uint32_t arg_size) mutex_lock(&lrme_hw->hw_mutex); mutex_lock(&lrme_hw->hw_mutex); if (lrme_hw->open_count == 0) { if (lrme_hw->open_count == 0 || lrme_hw->hw_state == CAM_HW_STATE_POWER_DOWN) { mutex_unlock(&lrme_hw->hw_mutex); mutex_unlock(&lrme_hw->hw_mutex); CAM_ERR(CAM_LRME, "Error Unbalanced stop"); CAM_ERR(CAM_LRME, "Error Unbalanced stop"); return -EINVAL; return -EINVAL; Loading Loading @@ -886,10 +887,8 @@ int cam_lrme_hw_stop(void *hw_priv, void *hw_stop_args, uint32_t arg_size) } } rc = cam_lrme_soc_disable_resources(lrme_hw); rc = cam_lrme_soc_disable_resources(lrme_hw); if (rc) { if (rc) CAM_ERR(CAM_LRME, "Failed in Disable SOC, rc=%d", rc); CAM_ERR(CAM_LRME, "Failed in Disable SOC, rc=%d", rc); goto unlock; } lrme_hw->hw_state = CAM_HW_STATE_POWER_DOWN; lrme_hw->hw_state = CAM_HW_STATE_POWER_DOWN; if (lrme_core->state == CAM_LRME_CORE_STATE_IDLE) { if (lrme_core->state == CAM_LRME_CORE_STATE_IDLE) { Loading Loading @@ -1051,9 +1050,9 @@ int cam_lrme_hw_flush(void *hw_priv, void *hw_flush_args, uint32_t arg_size) if (lrme_core->state != CAM_LRME_CORE_STATE_PROCESSING && if (lrme_core->state != CAM_LRME_CORE_STATE_PROCESSING && lrme_core->state != CAM_LRME_CORE_STATE_REQ_PENDING && lrme_core->state != CAM_LRME_CORE_STATE_REQ_PENDING && lrme_core->state == CAM_LRME_CORE_STATE_REQ_PROC_PEND) { lrme_core->state != CAM_LRME_CORE_STATE_REQ_PROC_PEND) { mutex_unlock(&lrme_hw->hw_mutex); mutex_unlock(&lrme_hw->hw_mutex); CAM_DBG(CAM_LRME, "Stop not needed in %d state", CAM_DBG(CAM_LRME, "Flush is not needed in %d state", lrme_core->state); lrme_core->state); return 0; return 0; } } Loading