Prechádzať zdrojové kódy

msm: camera: cdm: Fix incorrect condition in cdm code

Fix the incorrect condition in the cdm code and also
remove cdm debug register dump from ife_hw_mgr_config
function to avoid the duplication of the dump with the
one being printed from cdm workqueue.

CRs-fixed: 3064926
Change-Id: Idd5938030d4f9737e5ab3301d08dd221b25a54ea
Signed-off-by: Jigar Agrawal <[email protected]>
Jigar Agrawal 3 rokov pred
rodič
commit
6c9d86d45f

+ 3 - 8
drivers/cam_cdm/cam_cdm_hw_core.c

@@ -961,7 +961,7 @@ int cam_hw_cdm_submit_bl(struct cam_hw_info *cdm_hw,
 		dma_addr_t hw_vaddr_ptr = 0;
 		size_t len = 0;
 
-		if ((!cdm_cmd->cmd[i].len) && (cdm_cmd->cmd[i].len > CAM_CDM_MAX_BL_LENGTH)) {
+		if ((!cdm_cmd->cmd[i].len) || (cdm_cmd->cmd[i].len > CAM_CDM_MAX_BL_LENGTH)) {
 			CAM_ERR(CAM_CDM,
 				"cmd len=: %d is invalid_ent: %d, num_cmd_ent: %d",
 				cdm_cmd->cmd[i].len, i,
@@ -1309,11 +1309,7 @@ static void cam_hw_cdm_work(struct work_struct *work)
 		mutex_lock(&cdm_hw->hw_mutex);
 		for (i = 0; i < core->offsets->reg_data->num_bl_fifo; i++)
 			mutex_lock(&core->bl_fifo[i].fifo_lock);
-		/*
-		 * First pause CDM, If it fails still proceed
-		 * to dump debug info
-		 */
-		cam_hw_cdm_pause_core(cdm_hw, true);
+
 		cam_hw_cdm_dump_core_debug_registers(cdm_hw, true);
 
 		if (payload->irq_status &
@@ -1338,8 +1334,7 @@ static void cam_hw_cdm_work(struct work_struct *work)
 				kfree(node);
 			}
 		}
-		/* Resume CDM back */
-		cam_hw_cdm_pause_core(cdm_hw, false);
+
 		for (i = 0; i < core->offsets->reg_data->num_bl_fifo; i++)
 			mutex_unlock(&core->bl_fifo[i].fifo_lock);
 

+ 3 - 3
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -5953,9 +5953,9 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
 				CAM_ERR(CAM_ISP,
 					"config done completion timeout for req_id=%llu ctx_index %d",
 					cfg->request_id, ctx->ctx_index);
-				if (cam_cdm_detect_hang_error(ctx->cdm_handle))
-					cam_cdm_dump_debug_registers(
-						ctx->cdm_handle);
+				if (!cam_cdm_detect_hang_error(ctx->cdm_handle))
+					CAM_ERR(CAM_ISP, "CDM Workqueue delayed");
+
 				rc = -ETIMEDOUT;
 			} else {
 				CAM_DBG(CAM_ISP,