Преглед на файлове

msm: camera: isp: Add isp resource name

For ISP resources, res_id is printed, which does not give clear
indication of resource. At some places translation code is
used which is an overhead.
This commit adds name to isp resource node structure.
This will be helpful while printing the resource logs and
avoids the translation overhead.

CRs-Fixed: 2830502
Change-Id: I436810e971a521fe2e845a2e3ca544b4c2921727
Signed-off-by: Gaurav Jindal <[email protected]>
Gaurav Jindal преди 4 години
родител
ревизия
558d953113

+ 34 - 98
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -952,8 +952,10 @@ static int cam_ife_hw_mgr_free_hw_res(
 				sizeof(struct cam_isp_resource_node));
 			if (rc)
 				CAM_ERR(CAM_ISP,
-					"Release HW:%d resource id %d failed",
-					hw_intf->hw_idx, isp_hw_res->res_id);
+					"Release HW:%d Res: %s resource id %d failed",
+					hw_intf->hw_idx,
+					isp_hw_res->hw_res[i]->res_name,
+					isp_hw_res->res_id);
 			isp_hw_res->hw_res[i] = NULL;
 		} else
 			CAM_ERR(CAM_ISP, "Release null");
@@ -985,75 +987,6 @@ static const char *cam_ife_hw_mgr_get_res_state(
 	}
 }
 
-static const char *cam_ife_hw_mgr_get_csid_res_id(
-	uint32_t res_id)
-{
-	switch (res_id) {
-	case CAM_IFE_PIX_PATH_RES_RDI_0:
-		return "RDI_0";
-	case CAM_IFE_PIX_PATH_RES_RDI_1:
-		return "RDI_1";
-	case CAM_IFE_PIX_PATH_RES_RDI_2:
-		return "RDI_2";
-	case CAM_IFE_PIX_PATH_RES_RDI_3:
-		return "RDI_3";
-	case CAM_IFE_PIX_PATH_RES_IPP:
-		return "IPP";
-	case CAM_IFE_PIX_PATH_RES_PPP:
-		return "PPP";
-	default:
-		return "INVALID";
-	}
-}
-
-static const char *cam_ife_hw_mgr_get_src_res_id(
-	uint32_t res_id)
-{
-	switch (res_id) {
-	case CAM_ISP_HW_VFE_IN_CAMIF:
-		return "CAMIF";
-	case CAM_ISP_HW_VFE_IN_TESTGEN:
-		return "TESTGEN";
-	case CAM_ISP_HW_VFE_IN_RD:
-		return "BUS_RD";
-	case CAM_ISP_HW_VFE_IN_RDI0:
-		return "RDI_0";
-	case CAM_ISP_HW_VFE_IN_RDI1:
-		return "RDI_1";
-	case CAM_ISP_HW_VFE_IN_RDI2:
-		return "RDI_2";
-	case CAM_ISP_HW_VFE_IN_RDI3:
-		return "RDI_3";
-	case CAM_ISP_HW_VFE_IN_PDLIB:
-		return "PDLIB";
-	case CAM_ISP_HW_VFE_IN_LCR:
-		return "LCR";
-	default:
-		return "INVALID";
-	}
-}
-
-static const char *cam_ife_hw_mgr_get_sfe_src_res_id(
-	uint32_t res_id)
-{
-	switch (res_id) {
-	case CAM_ISP_HW_SFE_IN_PIX:
-		return "PIX";
-	case CAM_ISP_HW_SFE_IN_RDI0:
-		return "RDI_0";
-	case CAM_ISP_HW_SFE_IN_RDI1:
-		return "RDI_1";
-	case CAM_ISP_HW_SFE_IN_RDI2:
-		return "RDI_2";
-	case CAM_ISP_HW_SFE_IN_RDI3:
-		return "RDI_3";
-	case CAM_ISP_HW_SFE_IN_RDI4:
-		return "RDI_4";
-	default:
-		return "INVALID";
-	}
-}
-
 static void cam_ife_hw_mgr_dump_all_ctx(void)
 {
 	uint32_t i;
@@ -1089,9 +1022,10 @@ static void cam_ife_hw_mgr_dump_all_ctx(void)
 					continue;
 
 				CAM_INFO_RATE_LIMIT(CAM_ISP,
-					"csid:%d res_type:%d res_id:%d res_state:%d",
+					"csid:%d res_type:%d res: %s res_id:%d res_state:%d",
 					hw_mgr_res->hw_res[i]->hw_intf->hw_idx,
 					hw_mgr_res->hw_res[i]->res_type,
+					hw_mgr_res->hw_res[i]->res_name,
 					hw_mgr_res->hw_res[i]->res_id,
 					hw_mgr_res->hw_res[i]->res_state);
 			}
@@ -1222,10 +1156,9 @@ fail:
 			hw_res = hw_mgr_res->hw_res[i];
 			if (hw_res && hw_res->hw_intf)
 				CAM_INFO(CAM_ISP,
-					"IFE src split_id:%d res_id:%s hw_idx:%u state:%s",
+					"IFE src split_id:%d res:%s hw_idx:%u state:%s",
 					i,
-					cam_ife_hw_mgr_get_src_res_id(
-					hw_res->res_id),
+					hw_res->res_name,
 					hw_res->hw_intf->hw_idx,
 					cam_ife_hw_mgr_get_res_state
 					(hw_res->res_state));
@@ -1238,10 +1171,9 @@ fail:
 			hw_res = hw_mgr_res->hw_res[i];
 			if (hw_res && hw_res->hw_intf)
 				CAM_INFO(CAM_ISP,
-					"SFE src split_id:%d res_id:%s hw_idx:%u state:%s",
+					"SFE src split_id:%d res:%s hw_idx:%u state:%s",
 					i,
-					cam_ife_hw_mgr_get_sfe_src_res_id(
-					hw_res->res_id),
+					hw_res->res_name,
 					hw_res->hw_intf->hw_idx,
 					cam_ife_hw_mgr_get_res_state
 					(hw_res->res_state));
@@ -1281,10 +1213,9 @@ static void cam_ife_hw_mgr_dump_acq_data(
 			hw_res = hw_mgr_res->hw_res[i];
 			if (hw_res && hw_res->hw_intf)
 				CAM_INFO(CAM_ISP,
-					"CSID split_id: %d res_id: %s hw_idx: %u state: %s",
+					"CSID split_id: %d res: %s hw_idx: %u state: %s",
 					i,
-					cam_ife_hw_mgr_get_csid_res_id(
-					hw_res->res_id),
+					hw_res->res_name,
 					hw_res->hw_intf->hw_idx,
 					cam_ife_hw_mgr_get_res_state
 					(hw_res->res_state));
@@ -1298,10 +1229,9 @@ static void cam_ife_hw_mgr_dump_acq_data(
 			hw_res = hw_mgr_res->hw_res[i];
 			if (hw_res && hw_res->hw_intf)
 				CAM_INFO(CAM_ISP,
-					"IFE src split_id: %d res_id: %s hw_idx: %u state: %s",
+					"IFE src split_id: %d res: %s hw_idx: %u state: %s",
 					i,
-					cam_ife_hw_mgr_get_src_res_id(
-					hw_res->res_id),
+					hw_res->res_name,
 					hw_res->hw_intf->hw_idx,
 					cam_ife_hw_mgr_get_res_state
 					(hw_res->res_state));
@@ -1315,10 +1245,9 @@ static void cam_ife_hw_mgr_dump_acq_data(
 			hw_res = hw_mgr_res->hw_res[i];
 			if (hw_res && hw_res->hw_intf)
 				CAM_INFO(CAM_ISP,
-					"IFE src_rd split_id: %d res_id: %s hw_idx: %u state: %s",
+					"IFE src_rd split_id: %d res: %s hw_idx: %u state: %s",
 					i,
-					cam_ife_hw_mgr_get_src_res_id(
-					hw_res->res_id),
+					hw_res->res_name,
 					hw_res->hw_intf->hw_idx,
 					cam_ife_hw_mgr_get_res_state
 					(hw_res->res_state));
@@ -1332,8 +1261,8 @@ static void cam_ife_hw_mgr_dump_acq_data(
 			hw_res = hw_mgr_res->hw_res[j];
 			if (hw_res && hw_res->hw_intf)
 				CAM_INFO(CAM_ISP,
-					"IFE out split_id: %d res_id: 0x%x hw_idx: %u state: %s",
-					j, hw_res->res_id,
+					"IFE out split_id: %d res: %s res_id: 0x%x hw_idx: %u state: %s",
+					j, hw_res->res_name, hw_res->res_id,
 					hw_res->hw_intf->hw_idx,
 					cam_ife_hw_mgr_get_res_state
 					(hw_res->res_state));
@@ -1409,8 +1338,9 @@ static int cam_ife_mgr_csid_stop_hw(
 			isp_res = hw_mgr_res->hw_res[i];
 			if (isp_res->hw_intf->hw_idx != base_idx)
 				continue;
-			CAM_DBG(CAM_ISP, "base_idx %d res_id %d cnt %u",
-				base_idx, isp_res->res_id, cnt);
+			CAM_DBG(CAM_ISP, "base_idx %d res:%s res_id %d cnt %u",
+				base_idx, isp_res->res_name,
+				isp_res->res_id, cnt);
 			stop_res[cnt] = isp_res;
 			cnt++;
 		}
@@ -2023,8 +1953,9 @@ static int cam_ife_hw_mgr_acquire_res_sfe_out_pix(
 
 			sfe_out_res->hw_res[j] =
 				sfe_acquire.sfe_out.rsrc_node;
-			CAM_DBG(CAM_ISP, "resource type: 0x%x res id: 0x%x",
+			CAM_DBG(CAM_ISP, "resource type: 0x%x res: %s res id: 0x%x",
 				sfe_out_res->hw_res[j]->res_type,
+				sfe_out_res->hw_res[j]->res_name,
 				sfe_out_res->hw_res[j]->res_id);
 
 		}
@@ -2419,9 +2350,10 @@ static int cam_ife_hw_mgr_acquire_res_sfe_src(
 			sfe_acquire.sfe_in.rsrc_node;
 
 		CAM_DBG(CAM_ISP,
-				"acquire success LEFT SFE: %u res_type: %u res_id: %u",
+				"acquire success LEFT SFE: %u res: %s res_type: %u res_id: %u",
 				hw_intf->hw_idx,
 				sfe_src_res->hw_res[0]->res_type,
+				sfe_src_res->hw_res[0]->res_name,
 				sfe_src_res->hw_res[0]->res_id);
 
 		if ((csid_res->is_dual_isp) &&
@@ -2709,9 +2641,10 @@ static int cam_ife_hw_mgr_acquire_sfe_bus_rd(
 
 acquire_successful:
 	CAM_DBG(CAM_ISP,
-		"SFE RD left [%u] acquired success for path: %u is_dual: %d res_id: 0x%x",
+		"SFE RD left [%u] acquired success for path: %u is_dual: %d res: %s res_id: 0x%x",
 		sfe_rd_res->hw_res[0]->hw_intf->hw_idx, path_res_id,
-		in_port->usage_type, sfe_rd_res->hw_res[0]->res_id);
+		in_port->usage_type, sfe_rd_res->hw_res[0]->res_name,
+		sfe_rd_res->hw_res[0]->res_id);
 
 	sfe_rd_res->res_id = in_port->sfe_in_path_type;
 	sfe_rd_res->res_type = sfe_acquire.rsrc_type;
@@ -2837,9 +2770,10 @@ static int cam_ife_hw_mgr_acquire_ife_src_for_sfe(
 	acquired_hw_path[0] |= cam_convert_res_id_to_hw_path(
 				ife_src_res->hw_res[0]->res_id);
 	CAM_DBG(CAM_ISP,
-		"acquire success LEFT IFE: %d res type: 0x%x res id: 0x%x",
+		"acquire success LEFT IFE: %d res type: 0x%x res: %s res id: 0x%x",
 		hw_intf->hw_idx,
 		ife_src_res->hw_res[0]->res_type,
+		ife_src_res->hw_res[0]->res_name,
 		ife_src_res->hw_res[0]->res_id);
 
 	if (ife_ctx->flags.is_dual) {
@@ -2879,9 +2813,10 @@ static int cam_ife_hw_mgr_acquire_ife_src_for_sfe(
 		acquired_hw_path[1] |= cam_convert_res_id_to_hw_path(
 				ife_src_res->hw_res[0]->res_id);
 		CAM_DBG(CAM_ISP,
-			"acquire success RIGHT IFE: %u res type: 0x%x res id: 0x%x",
+			"acquire success RIGHT IFE: %u res type: 0x%x res: %s res id: 0x%x",
 			hw_intf->hw_idx,
 			ife_src_res->hw_res[1]->res_type,
+			ife_src_res->hw_res[1]->res_name,
 			ife_src_res->hw_res[1]->res_id);
 	}
 
@@ -3032,9 +2967,10 @@ static int cam_ife_hw_mgr_acquire_res_ife_src(
 				ife_src_res->hw_res[i]->res_id);
 
 			CAM_DBG(CAM_ISP,
-				"acquire success IFE:%d res type :0x%x res id:0x%x",
+				"acquire success IFE:%d res type :0x%x res: %s res id:0x%x",
 				hw_intf->hw_idx,
 				ife_src_res->hw_res[i]->res_type,
+				ife_src_res->hw_res[i]->res_name,
 				ife_src_res->hw_res[i]->res_id);
 
 		}

+ 33 - 20
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.c

@@ -612,8 +612,8 @@ static int cam_ife_csid_path_reset(
 		return -EINVAL;
 	}
 
-	CAM_DBG(CAM_ISP, "CSID:%d reset res:%d",
-		csid_hw->hw_intf->hw_idx, res->res_id);
+	CAM_DBG(CAM_ISP, "CSID:%d reset Resource[id:%d name:%s]",
+		csid_hw->hw_intf->hw_idx, res->res_id, res->res_name);
 
 	switch (res->res_id) {
 	case CAM_IFE_PIX_PATH_RES_IPP:
@@ -659,8 +659,8 @@ static int cam_ife_csid_path_reset(
 			&csid_hw->irq_complete[irq_reg],
 			msecs_to_jiffies(IFE_CSID_TIMEOUT));
 
-	CAM_DBG(CAM_ISP, "CSID:%d resource :%d reset done",
-		csid_hw->hw_intf->hw_idx, res->res_id);
+	CAM_DBG(CAM_ISP, "CSID:%d resource[id:%d  name:%s] reset done",
+		csid_hw->hw_intf->hw_idx, res->res_id, res->res_name);
 
 	if (!rem_jiffies) {
 		rc = -ETIMEDOUT;
@@ -1772,9 +1772,9 @@ int cam_ife_csid_ver1_reserve(void *hw_priv,
 	csid_hw->event_cb = reserve->event_cb;
 	csid_hw->token = reserve->cb_priv;
 
-	CAM_DBG(CAM_ISP, "CSID %d Res_id %d state %d cid %d",
+	CAM_DBG(CAM_ISP, "CSID %d Resource[id:%d name:%s] state %d cid %d",
 		csid_hw->hw_intf->hw_idx, reserve->res_id,
-		res->res_state, cid);
+		res->res_name, res->res_state, cid);
 
 	return 0;
 }
@@ -1847,9 +1847,9 @@ int cam_ife_csid_ver1_release(void *hw_priv,
 	}
 
 	CAM_DBG(CAM_ISP,
-		"CSID:%d res type :%d Resource id:%d csi2_reserve_cnt:%d",
+		"CSID:%d res type :%d Resource[id:%d name:%s] csi2_reserve_cnt:%d",
 		csid_hw->hw_intf->hw_idx, res->res_type, res->res_id,
-		csid_hw->counters.csi2_reserve_cnt);
+		res->res_name, csid_hw->counters.csi2_reserve_cnt);
 
 	res->res_state = CAM_ISP_RESOURCE_STATE_AVAILABLE;
 end:
@@ -1895,8 +1895,8 @@ static int cam_ife_csid_ver1_start_rdi_path(
 	cam_io_w_mb(CAM_CSID_RESUME_AT_FRAME_BOUNDARY,
 		mem_base + path_reg->ctrl_addr);
 
-	CAM_DBG(CAM_ISP, "CSID:%d Rdi res: %d",
-		csid_hw->hw_intf->hw_idx, res->res_id);
+	CAM_DBG(CAM_ISP, "CSID:%d start: %s",
+		csid_hw->hw_intf->hw_idx, res->res_name);
 
 	val = path_reg->fatal_err_mask | path_reg->non_fatal_err_mask |
 		csid_hw->debug_info.path_mask |
@@ -1948,8 +1948,8 @@ static int cam_ife_csid_ver1_start_udi_path(
 	cam_io_w_mb(CAM_CSID_RESUME_AT_FRAME_BOUNDARY,
 		mem_base + path_reg->ctrl_addr);
 
-	CAM_DBG(CAM_ISP, "CSID:%d Udi res: %d",
-		csid_hw->hw_intf->hw_idx, res->res_id);
+	CAM_DBG(CAM_ISP, "CSID:%d Start:%s",
+		csid_hw->hw_intf->hw_idx, res->res_name);
 
 	val = path_reg->fatal_err_mask | path_reg->non_fatal_err_mask |
 		csid_hw->debug_info.path_mask |
@@ -2054,9 +2054,9 @@ static int cam_ife_csid_ver1_start_pix_path(
 	cam_io_w_mb(val,
 		soc_info->reg_map[0].mem_base + path_reg->ctrl_addr);
 
-	CAM_DBG(CAM_ISP, "CSID:%d Pix res: %d ctrl val: 0x%x",
+	CAM_DBG(CAM_ISP, "CSID:%d Resource[id:%d name:%s]ctrl val: 0x%x",
 		csid_hw->hw_intf->hw_idx,
-		res->res_id, val);
+		res->res_id, res->res_name, val);
 
 	val = path_reg->fatal_err_mask | path_reg->non_fatal_err_mask |
 		csid_hw->debug_info.path_mask |
@@ -2294,6 +2294,7 @@ static int cam_ife_csid_ver1_init_config_rdi_path(
 	val = cam_io_r_mb(mem_base + path_reg->cfg0_addr);
 	val |= (1 << cmn_reg->path_en_shift_val);
 	cam_io_w_mb(val, mem_base + path_reg->cfg0_addr);
+	CAM_DBG(CAM_ISP, "%s cfg0 0x%x", res->res_name, val);
 	res->res_state = CAM_ISP_RESOURCE_STATE_INIT_HW;
 
 	return rc;
@@ -2424,6 +2425,7 @@ static int cam_ife_csid_ver1_init_config_udi_path(
 	val = cam_io_r_mb(mem_base + path_reg->cfg0_addr);
 	val |= (1 << cmn_reg->path_en_shift_val);
 	cam_io_w_mb(val, mem_base + path_reg->cfg0_addr);
+	CAM_DBG(CAM_ISP, "%s cfg0 0x%x", res->res_name, val);
 
 	if (path_reg->overflow_ctrl_en) {
 		val = path_reg->overflow_ctrl_en |
@@ -2610,6 +2612,7 @@ static int cam_ife_csid_ver1_init_config_pxl_path(
 	val = cam_io_r_mb(mem_base + path_reg->cfg0_addr);
 	val |= (1 << cmn_reg->path_en_shift_val);
 	cam_io_w_mb(val, mem_base + path_reg->cfg0_addr);
+	CAM_DBG(CAM_ISP, "%s cfg0 0x%x", res->res_name, val);
 
 	res->res_state = CAM_ISP_RESOURCE_STATE_INIT_HW;
 
@@ -3206,9 +3209,9 @@ int cam_ife_csid_ver1_stop(void *hw_priv,
 
 		res = csid_stop->node_res[i];
 		res_mask |= (1 << res->res_id);
-		CAM_DBG(CAM_ISP, "CSID:%d res_type %d res_id %d",
+		CAM_DBG(CAM_ISP, "CSID:%d res_type %d Resource[id:%d name:%s]",
 			csid_hw->hw_intf->hw_idx,
-			res->res_type, res->res_id);
+			res->res_type, res->res_id, res->res_name);
 
 		switch (res->res_id) {
 		case CAM_IFE_PIX_PATH_RES_IPP:
@@ -4599,14 +4602,16 @@ static int cam_ife_csid_ver1_hw_init_path_res(
 	int rc = 0;
 	int i;
 	struct cam_ife_csid_ver1_reg_info *csid_reg;
+	struct cam_isp_resource_node *res;
 
 	csid_reg = (struct cam_ife_csid_ver1_reg_info *)
 			ife_csid_hw->core_info->csid_reg;
 
 	/* Initialize the IPP resources */
 	if (csid_reg->cmn_reg->num_pix) {
+		res = &ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_IPP];
 		rc = cam_ife_ver1_hw_alloc_res(
-			&ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_IPP],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			ife_csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_IPP);
@@ -4615,12 +4620,14 @@ static int cam_ife_csid_ver1_hw_init_path_res(
 				ife_csid_hw->hw_intf->hw_idx);
 			goto free_res;
 		}
+		scnprintf(res->res_name, CAM_ISP_RES_NAME_LEN, "IPP");
 	}
 
 	/* Initialize PPP resource */
 	if (csid_reg->cmn_reg->num_ppp) {
+		res = &ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_PPP];
 		rc = cam_ife_ver1_hw_alloc_res(
-			&ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_PPP],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			ife_csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_PPP);
@@ -4629,13 +4636,16 @@ static int cam_ife_csid_ver1_hw_init_path_res(
 				ife_csid_hw->hw_intf->hw_idx);
 			goto free_res;
 		}
+		scnprintf(res->res_name,
+				CAM_ISP_RES_NAME_LEN, "PPP");
 	}
 
 	/* Initialize the RDI resource */
 	for (i = 0; i < csid_reg->cmn_reg->num_rdis; i++) {
 		/* res type is from RDI 0 to RDI3 */
+		res = &ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_RDI_0 + i];
 		rc = cam_ife_ver1_hw_alloc_res(
-			&ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_RDI_0 + i],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			ife_csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_RDI_0 + i);
@@ -4644,13 +4654,15 @@ static int cam_ife_csid_ver1_hw_init_path_res(
 				ife_csid_hw->hw_intf->hw_idx, i);
 			goto free_res;
 		}
+		scnprintf(res->res_name, CAM_ISP_RES_NAME_LEN, "RDI_%d", i);
 	}
 
 	/* Initialize the UDI resource */
 	for (i = 0; i < csid_reg->cmn_reg->num_udis; i++) {
 		/* res type is from UDI0 to UDI3 */
+		res = &ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_UDI_0 + i];
 		rc = cam_ife_ver1_hw_alloc_res(
-			&ife_csid_hw->path_res[CAM_IFE_PIX_PATH_RES_UDI_0 + i],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			ife_csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_UDI_0 + i);
@@ -4659,6 +4671,7 @@ static int cam_ife_csid_ver1_hw_init_path_res(
 				ife_csid_hw->hw_intf->hw_idx, i);
 			goto free_res;
 		}
+		scnprintf(res->res_name, CAM_ISP_RES_NAME_LEN, "UDI_%d", i);
 	}
 
 	return rc;

+ 40 - 23
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c

@@ -1039,7 +1039,6 @@ static int cam_ife_csid_ver2_ipp_bottom_half(
 	uint32_t                                   expected_frame = 0;
 	uint32_t                                   actual_frame = 0;
 	void    __iomem                           *base;
-	char                                       tag[15];
 	int                                        irq_idx;
 	struct cam_isp_resource_node               *res;
 
@@ -1062,9 +1061,8 @@ static int cam_ife_csid_ver2_ipp_bottom_half(
 			csid_reg->cmn_reg->num_rdis);
 	irq_status_ipp = payload->irq_reg_val[irq_idx];
 
-	snprintf(tag, sizeof(tag), "CSID:%d IPP", csid_hw->hw_intf->hw_idx);
-
-	CAM_DBG(CAM_ISP, "%s status:0x%x", tag, irq_status_ipp);
+	CAM_DBG(CAM_ISP, "CSID[%u] IPP status:0x%x", csid_hw->hw_intf->hw_idx,
+		irq_status_ipp);
 
 	evt_info.hw_idx   = csid_hw->hw_intf->hw_idx;
 	evt_info.res_id   = CAM_IFE_PIX_PATH_RES_IPP;
@@ -1180,6 +1178,9 @@ static int cam_ife_csid_ver2_ppp_bottom_half(
 	err_mask = csid_reg->ppp_reg->fatal_err_mask |
 			csid_reg->ppp_reg->non_fatal_err_mask;
 
+	CAM_DBG(CAM_ISP, "CSID[%u] PPP status:0x%x", csid_hw->hw_intf->hw_idx,
+		irq_status_ppp);
+
 	cam_ife_csid_ver2_parse_path_irq_status(
 		csid_hw, CAM_IFE_CSID_IRQ_REG_PPP,
 		err_mask, irq_status_ppp);
@@ -1959,8 +1960,8 @@ int cam_ife_csid_ver2_reserve(void *hw_priv,
 
 	reserve->need_top_cfg = csid_reg->need_top_cfg;
 
-	CAM_DBG(CAM_ISP, "CSID %d Res_id %d state %d cid %d",
-		csid_hw->hw_intf->hw_idx, reserve->res_id,
+	CAM_DBG(CAM_ISP, "CSID[%u] Resource[id: %d name:%s] state %d cid %d",
+		csid_hw->hw_intf->hw_idx, reserve->res_id, res->res_name,
 		res->res_state, cid);
 
 	return rc;
@@ -2019,8 +2020,9 @@ int cam_ife_csid_ver2_release(void *hw_priv,
 		goto end;
 	}
 
-	CAM_DBG(CAM_ISP, "CSID:%d res type :%d Resource id:%d",
-		csid_hw->hw_intf->hw_idx, res->res_type, res->res_id);
+	CAM_DBG(CAM_ISP, "CSID:%d res type :%d Resource [id:%d name:%s]",
+		csid_hw->hw_intf->hw_idx, res->res_type,
+		res->res_id, res->res_name);
 
 	path_cfg = (struct cam_ife_csid_ver2_path_cfg *)res->res_priv;
 
@@ -2590,7 +2592,8 @@ static int cam_ife_csid_ver2_start_rdi_path(
 	val = cam_io_r_mb(mem_base + csid_reg->cmn_reg->rup_aup_cmd_addr);
 	val |= path_reg->rup_aup_mask;
 	cam_io_w_mb(val, mem_base + csid_reg->cmn_reg->rup_aup_cmd_addr);
-	CAM_DBG(CAM_ISP, "CSID[%d] rup_cmd_addr %x val %x",
+	CAM_DBG(CAM_ISP, "CSID[%d] Res: %s rup_cmd_addr %x val %x",
+		csid_hw->hw_intf->hw_idx, res->res_name,
 		csid_reg->cmn_reg->rup_aup_cmd_addr, val);
 
 	return rc;
@@ -3529,9 +3532,10 @@ int cam_ife_csid_ver2_stop(void *hw_priv,
 		res = csid_stop->node_res[i];
 		rc = cam_ife_csid_ver2_disable_path(csid_hw, res);
 		res->res_state = CAM_ISP_RESOURCE_STATE_INIT_HW;
-		CAM_DBG(CAM_ISP, "CSID:%d res_type %d res_id %d",
+		CAM_DBG(CAM_ISP, "CSID:%d res_type %d Resource[id:%d name:%s]",
 			csid_hw->hw_intf->hw_idx,
-			res->res_type, res->res_id);
+			res->res_type, res->res_id,
+			res->res_name);
 	}
 	mutex_unlock(&csid_hw->hw_info->hw_mutex);
 
@@ -3774,9 +3778,10 @@ static int cam_ife_csid_ver2_reg_update(
 
 	return rc;
 err:
-	CAM_ERR(CAM_ISP, "CSID[%d] wrong res_id %d",
+	CAM_ERR(CAM_ISP, "CSID[%d] wrong Resource[id:%d name:%s]",
 		csid_hw->hw_intf->hw_idx,
-		rup_args->res[i]->res_id);
+		rup_args->res[i]->res_id,
+		rup_args->res[i]->res_name);
 	return rc;
 }
 
@@ -3919,8 +3924,8 @@ static int cam_ife_csid_ver2_get_time_stamp(
 			csid_hw->timestamp.prev_boot_ts + time_delta;
 	}
 
-	CAM_DBG(CAM_ISP, "timestamp:%lld",
-		timestamp_args->boot_timestamp);
+	CAM_DBG(CAM_ISP, "Resource[id:%d name:%s timestamp:%lld]",
+		res->res_id, res->res_name, timestamp_args->boot_timestamp);
 	csid_hw->timestamp.prev_sof_ts = timestamp_args->time_stamp_val;
 	csid_hw->timestamp.prev_boot_ts = timestamp_args->boot_timestamp;
 
@@ -3983,8 +3988,8 @@ static int cam_ife_csid_ver2_print_hbi_vbi(
 		return -EINVAL;
 	}
 
-	CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID: %d res: %d hbi %u vbi %u",
-		res->res_id, hbi, vbi);
+	CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID[%u] Resource[id:%d name:%s hbi %u vbi %u]",
+		res->res_id, res->res_name, hbi, vbi);
 
 	return 0;
 }
@@ -4021,7 +4026,9 @@ static int cam_ife_csid_ver2_set_csid_clock(
 		(struct cam_ife_csid_clock_update_args *)cmd_args;
 
 	csid_hw->clk_rate = clk_update->clk_rate;
-	CAM_INFO(CAM_ISP, "CSID clock rate %llu", csid_hw->clk_rate);
+	CAM_INFO(CAM_ISP, "CSID[%u] clock rate %llu",
+		csid_hw->hw_intf->hw_idx,
+		csid_hw->clk_rate);
 
 	return 0;
 }
@@ -4087,7 +4094,6 @@ static int cam_ife_csid_ver2_process_cmd(void *hw_priv,
 		rc = cam_ife_csid_ver2_set_csid_clock(csid_hw, cmd_args);
 		break;
 	case CAM_ISP_HW_CMD_DUMP_HW:
-		//rc = cam_ife_csid_ver2_dump_hw(csid_hw, cmd_args);
 		break;
 	case CAM_IFE_CSID_TOP_CONFIG:
 		rc = cam_ife_csid_ver2_top_cfg(csid_hw, cmd_args);
@@ -4203,14 +4209,16 @@ static int cam_ife_csid_ver2_hw_init_path_res(
 	int rc = 0;
 	int i;
 	struct cam_ife_csid_ver2_reg_info *csid_reg;
+	struct cam_isp_resource_node *res;
 
 	csid_reg = (struct cam_ife_csid_ver2_reg_info *)
 			csid_hw->core_info->csid_reg;
 
 	/* Initialize the IPP resources */
 	if (csid_reg->cmn_reg->num_pix) {
+		res = &csid_hw->path_res[CAM_IFE_PIX_PATH_RES_IPP];
 		rc = cam_ife_ver2_hw_alloc_res(
-			&csid_hw->path_res[CAM_IFE_PIX_PATH_RES_IPP],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_IPP);
@@ -4219,12 +4227,15 @@ static int cam_ife_csid_ver2_hw_init_path_res(
 				csid_hw->hw_intf->hw_idx);
 			goto free_res;
 		}
+		scnprintf(csid_hw->path_res[CAM_IFE_PIX_PATH_RES_IPP].res_name,
+			CAM_ISP_RES_NAME_LEN, "IPP");
 	}
 
 	/* Initialize PPP resource */
 	if (csid_reg->cmn_reg->num_ppp) {
+		res = &csid_hw->path_res[CAM_IFE_PIX_PATH_RES_PPP];
 		rc = cam_ife_ver2_hw_alloc_res(
-			&csid_hw->path_res[CAM_IFE_PIX_PATH_RES_PPP],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_PPP);
@@ -4233,13 +4244,16 @@ static int cam_ife_csid_ver2_hw_init_path_res(
 				csid_hw->hw_intf->hw_idx);
 			goto free_res;
 		}
+		scnprintf(csid_hw->path_res[CAM_IFE_PIX_PATH_RES_PPP].res_name,
+			CAM_ISP_RES_NAME_LEN, "PPP");
 	}
 
 	/* Initialize the RDI resource */
 	for (i = 0; i < csid_reg->cmn_reg->num_rdis; i++) {
 		/* res type is from RDI 0 to RDI3 */
+		res = &csid_hw->path_res[CAM_IFE_PIX_PATH_RES_RDI_0 + i];
 		rc = cam_ife_ver2_hw_alloc_res(
-			&csid_hw->path_res[CAM_IFE_PIX_PATH_RES_RDI_0 + i],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_RDI_0 + i);
@@ -4248,13 +4262,15 @@ static int cam_ife_csid_ver2_hw_init_path_res(
 				csid_hw->hw_intf->hw_idx, i);
 			goto free_res;
 		}
+		scnprintf(res->res_name, CAM_ISP_RES_NAME_LEN, "RDI_%d", i);
 	}
 
 	/* Initialize the UDI resource */
 	for (i = 0; i < csid_reg->cmn_reg->num_udis; i++) {
 		/* res type is from UDI0 to UDI3 */
+		res = &csid_hw->path_res[CAM_IFE_PIX_PATH_RES_UDI_0 + i];
 		rc = cam_ife_ver2_hw_alloc_res(
-			&csid_hw->path_res[CAM_IFE_PIX_PATH_RES_UDI_0 + i],
+			res,
 			CAM_ISP_RESOURCE_PIX_PATH,
 			csid_hw->hw_intf,
 			CAM_IFE_PIX_PATH_RES_UDI_0 + i);
@@ -4263,6 +4279,7 @@ static int cam_ife_csid_ver2_hw_init_path_res(
 				csid_hw->hw_intf->hw_idx, i);
 			goto free_res;
 		}
+		scnprintf(res->res_name, CAM_ISP_RES_NAME_LEN, "UDI_%d", i);
 	}
 
 	return rc;

+ 7 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_isp_hw.h

@@ -19,6 +19,11 @@
 /* Max isp hw pid values number */
 #define CAM_ISP_HW_MAX_PID_VAL      4
 
+/*
+ * MAX len of ISP Resource Name
+ */
+#define CAM_ISP_RES_NAME_LEN      16
+
 /*
  * struct cam_isp_timestamp:
  *
@@ -177,6 +182,7 @@ enum cam_isp_hw_cmd_type {
  *                                specific to the resource
  * @top_half_handler:             Top Half handler function
  * @bottom_half_handler:          Bottom Half handler function
+ * @res_name:                     Name of resource
  */
 struct cam_isp_resource_node {
 	enum cam_isp_resource_type     res_type;
@@ -200,6 +206,7 @@ struct cam_isp_resource_node {
 		uint32_t cmd_type, void *cmd_args, uint32_t arg_size);
 	CAM_IRQ_HANDLER_TOP_HALF       top_half_handler;
 	CAM_IRQ_HANDLER_BOTTOM_HALF    bottom_half_handler;
+	uint8_t                        res_name[CAM_ISP_RES_NAME_LEN];
 };
 
 /*

+ 7 - 23
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_top/cam_sfe_top.c

@@ -384,27 +384,6 @@ static const struct cam_sfe_top_debug_info sfe_dbg_list[][8] = {
 	},
 };
 
-static const char *cam_sfe_top_res_id_to_string(
-	uint32_t res_id)
-{
-	switch (res_id) {
-	case CAM_ISP_HW_SFE_IN_PIX:
-		return "PP";
-	case CAM_ISP_HW_SFE_IN_RDI0:
-		return "RDI0";
-	case CAM_ISP_HW_SFE_IN_RDI1:
-		return "RDI1";
-	case CAM_ISP_HW_SFE_IN_RDI2:
-		return "RDI2";
-	case CAM_ISP_HW_SFE_IN_RDI3:
-		return "RDI3";
-	case CAM_ISP_HW_SFE_IN_RDI4:
-		return "RDI4";
-	default:
-		return "";
-	}
-}
-
 static void cam_sfe_top_check_module_status(
 	uint32_t num_reg, uint32_t *reg_val,
 	const struct cam_sfe_top_debug_info status_list[][8])
@@ -1366,7 +1345,7 @@ static int cam_sfe_top_handle_irq_bottom_half(
 		if (irq_status[0] & path_data->path_reg_data->sof_irq_mask) {
 			CAM_DBG(CAM_SFE, "SFE:%d Received %s SOF",
 				evt_info.hw_idx,
-				cam_sfe_top_res_id_to_string(res->res_id));
+				res->res_name);
 			offset0 = path_data->common_reg->diag_sensor_status_0;
 			offset1 = path_data->common_reg->diag_sensor_status_1;
 			/* check for any debug info at SOF */
@@ -1394,7 +1373,7 @@ static int cam_sfe_top_handle_irq_bottom_half(
 			path_data->path_reg_data->eof_irq_mask) {
 			CAM_DBG(CAM_SFE, "SFE:%d Received %s EOF",
 				evt_info.hw_idx,
-				cam_sfe_top_res_id_to_string(res->res_id));
+				res->res_name);
 		}
 		ret = CAM_SFE_IRQ_STATUS_SUCCESS;
 	}
@@ -1708,6 +1687,8 @@ int cam_sfe_top_init(
 				sfe_top_hw_info->modules_hw_info;
 			path_data->hw_intf = hw_intf;
 			path_data->soc_info = soc_info;
+			scnprintf(top_priv->in_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "PIX");
 		} else if (sfe_top_hw_info->input_type[i] ==
 			CAM_SFE_RDI_VER_1_0) {
 			top_priv->in_rsrc[i].res_id =
@@ -1723,6 +1704,9 @@ int cam_sfe_top_init(
 				goto deinit_resources;
 			}
 
+			scnprintf(top_priv->in_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "RDI%d", j);
+
 			top_priv->in_rsrc[i].res_priv = path_data;
 
 			path_data->mem_base =

+ 96 - 23
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe480.h

@@ -1169,7 +1169,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				23,
-			}
+			},
+			.name          = {
+				"RDI_0",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI1,
@@ -1180,7 +1183,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				24,
-			}
+			},
+			.name          = {
+				"RDI_1",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI2,
@@ -1191,7 +1197,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				25,
-			}
+			},
+			.name          = {
+				"RDI_2",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_FULL,
@@ -1206,7 +1215,11 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.wm_idx        = {
 				0,
 				1,
-			}
+			},
+			.name          = {
+				"FULL_Y",
+				"FULL_C",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS4,
@@ -1217,7 +1230,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				2,
-			}
+			},
+			.name          = {
+				"DS_4",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS16,
@@ -1228,7 +1244,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				3,
-			}
+			},
+			.name          = {
+				"DS_16",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RAW_DUMP,
@@ -1240,7 +1259,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				10,
-			}
+			},
+			.name          = {
+				"PIXEL_RAW",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_FD,
@@ -1254,7 +1276,11 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.wm_idx        = {
 				8,
 				9,
-			}
+			},
+			.name          = {
+				"FD_Y",
+				"FD_C",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_PDAF,
@@ -1266,7 +1292,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				11,
-			}
+			},
+			.name          = {
+				"PDAF",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_HDR_BE,
@@ -1277,7 +1306,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				12,
-			}
+			},
+			.name          = {
+				"STATS_HDR_BE",
+			},
 		},
 		{
 			.vfe_out_type  =
@@ -1289,7 +1321,11 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				13,
-			}
+			},
+			.name          = {
+				"STATS_HDR_BHIST",
+			},
+
 		},
 		{
 			.vfe_out_type  =
@@ -1301,7 +1337,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				14,
-			}
+			},
+			.name          = {
+				"STATS_TL_BG",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_BF,
@@ -1312,7 +1351,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				20,
-			}
+			},
+			.name          = {
+				"STATS_BF",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_AWB_BG,
@@ -1323,7 +1365,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				15,
-			}
+			},
+			.name          = {
+				"STATS_AWB_BGB",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_BHIST,
@@ -1334,7 +1379,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				16,
-			}
+			},
+			.name          = {
+				"STATS_BHIST",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_RS,
@@ -1345,7 +1393,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				17,
-			}
+			},
+			.name          = {
+				"STATS_RS",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_CS,
@@ -1356,7 +1407,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				18,
-			}
+			},
+			.name          = {
+				"STATS_CS",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_IHIST,
@@ -1367,7 +1421,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				19,
-			}
+			},
+			.name          = {
+				"IHIST",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_FULL_DISP,
@@ -1382,7 +1439,11 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.wm_idx        = {
 				4,
 				5,
-			}
+			},
+			.name          = {
+				"FULL_DISP_Y",
+				"FULL_DISP_C",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS4_DISP,
@@ -1393,7 +1454,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				6,
-			}
+			},
+			.name          = {
+				"DISP_DS_4",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS16_DISP,
@@ -1404,7 +1468,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				7,
-			}
+			},
+			.name          = {
+				"DISP_DS_16",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_2PD,
@@ -1416,7 +1483,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				21,
-			}
+			},
+			.name          = {
+				"2PD",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_LCR,
@@ -1427,7 +1497,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe480_bus_hw_info = {
 			.num_wm        = 1,
 			.wm_idx        = {
 				22,
-			}
+			},
+			.name          = {
+				"LCR",
+			},
 		},
 	},
 	.num_comp_grp    = 14,

+ 78 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe680.h

@@ -1491,6 +1491,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				24,
 			},
+			.name          = {
+				"RDI_0",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI1,
@@ -1502,6 +1505,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				25,
 			},
+			.name          = {
+				"RDI_1",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI2,
@@ -1513,6 +1519,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				26,
 			},
+			.name          = {
+				"RDI_2",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_FULL,
@@ -1528,6 +1537,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 				0,
 				1,
 			},
+			.name          = {
+				"FULL_Y",
+				"FULL_C",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS4,
@@ -1539,6 +1552,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				2,
 			},
+			.name          = {
+				"DS_4",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS16,
@@ -1550,6 +1566,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				3,
 			},
+			.name          = {
+				"DS_16",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RAW_DUMP,
@@ -1562,6 +1581,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				10,
 			},
+			.name          = {
+				"PIXEL_RAW",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_FD,
@@ -1576,6 +1598,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 				8,
 				9,
 			},
+			.name          = {
+				"FD_Y",
+				"FD_C",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_PDAF,
@@ -1587,6 +1613,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				20,
 			},
+			.name          = {
+				"PDAF",
+			},
 		},
 		{
 			.vfe_out_type  =
@@ -1599,6 +1628,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				13,
 			},
+			.name          = {
+				"STATS_TL_BG",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_BF,
@@ -1610,6 +1642,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				16,
 			},
+			.name          = {
+				"STATS_BF",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_AWB_BG,
@@ -1621,6 +1656,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				14,
 			},
+			.name          = {
+				"STATS_AWB_BGB",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_BHIST,
@@ -1632,6 +1670,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				12,
 			},
+			.name          = {
+				"STATS_BHIST",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_RS,
@@ -1643,6 +1684,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				18,
 			},
+			.name          = {
+				"STATS_RS",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_IHIST,
@@ -1654,6 +1698,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				19,
 			},
+			.name          = {
+				"STATS_IHIST",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_FULL_DISP,
@@ -1669,6 +1716,10 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 				4,
 				5,
 			},
+			.name          = {
+				"FULL_DISP_Y",
+				"FULL_DISP_C",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS4_DISP,
@@ -1680,6 +1731,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				6,
 			},
+			.name          = {
+				"DISP_DS_4",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_DS16_DISP,
@@ -1691,6 +1745,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				7,
 			},
+			.name          = {
+				"DISP_DS_16",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_PREPROCESS_2PD,
@@ -1703,6 +1760,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				21,
 			},
+			.name          = {
+				"2PD",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_LCR,
@@ -1714,6 +1774,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				23,
 			},
+			.name          = {
+				"LCR",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_AWB_BFW,
@@ -1725,6 +1788,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				15,
 			},
+			.name          = {
+				"AWB_BFW",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_2PD,
@@ -1736,6 +1802,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				22,
 			},
+			.name          = {
+				"2PD_STATS",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_AEC_BE,
@@ -1747,6 +1816,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				11,
 			},
+			.name          = {
+				"AEC_BE",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_LTM_STATS,
@@ -1759,6 +1831,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				27,
 			},
+			.name          = {
+				"LTM",
+			},
 		},
 		{
 			.vfe_out_type  =
@@ -1771,6 +1846,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 			.wm_idx        = {
 				17,
 			},
+			.name          = {
+				"GTM_BHIST",
+			},
 		},
 	},
 	.num_comp_grp    = 17,

+ 13 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe_lite48x.h

@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
  */
 
 #ifndef _CAM_VFE_LITE48x_H_
@@ -378,6 +378,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe48x_bus_hw_info = {
 			.wm_idx        = {
 				0,
 			},
+			.name          = {
+				"LITE_0",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI1,
@@ -389,6 +392,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe48x_bus_hw_info = {
 			.wm_idx        = {
 				1,
 			},
+			.name          = {
+				"LITE_1",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI2,
@@ -400,6 +406,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe48x_bus_hw_info = {
 			.wm_idx        = {
 				2,
 			},
+			.name          = {
+				"LITE_2",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI3,
@@ -411,6 +420,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe48x_bus_hw_info = {
 			.wm_idx        = {
 				3,
 			},
+			.name          = {
+				"LITE_3",
+			},
 		},
 	},
 	.num_comp_grp    = 4,

+ 18 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe_lite68x.h

@@ -446,6 +446,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680x_bus_hw_info = {
 			.wm_idx        = {
 				0,
 			},
+			.name          = {
+				"LITE_0",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI1,
@@ -456,6 +459,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680x_bus_hw_info = {
 			.wm_idx        = {
 				1,
 			},
+			.name          = {
+				"LITE_1",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI2,
@@ -466,6 +472,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680x_bus_hw_info = {
 			.wm_idx        = {
 				2,
 			},
+			.name          = {
+				"LITE_2",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_RDI3,
@@ -476,6 +485,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680x_bus_hw_info = {
 			.wm_idx        = {
 				3,
 			},
+			.name          = {
+				"LITE_3",
+			},
 		},
 		{
 			.vfe_out_type  =
@@ -487,6 +499,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680x_bus_hw_info = {
 			.wm_idx        = {
 				4,
 			},
+			.name          = {
+				"PREPROCESS_RAW",
+			},
 		},
 		{
 			.vfe_out_type  = CAM_VFE_BUS_VER3_VFE_OUT_STATS_BG,
@@ -497,6 +512,9 @@ static struct cam_vfe_bus_ver3_hw_info vfe680x_bus_hw_info = {
 			.wm_idx        = {
 				5,
 			},
+			.name          = {
+				"STATS_BG",
+			},
 		},
 	},
 	.num_comp_grp    = 4,

+ 20 - 12
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -1381,10 +1381,11 @@ static int cam_vfe_bus_ver3_acquire_wm(
 	}
 
 	CAM_DBG(CAM_ISP,
-		"VFE:%d WM:%d processed width:%d height:%d stride:%d format:0x%X en_ubwc:%d %s",
+		"VFE:%d WM:%d %s processed width:%d height:%d stride:%d format:0x%X en_ubwc:%d %s",
 		rsrc_data->common_data->core_index, rsrc_data->index,
-		rsrc_data->width, rsrc_data->height, rsrc_data->stride,
-		rsrc_data->format, rsrc_data->en_ubwc, wm_mode);
+		wm_res->res_name, rsrc_data->width, rsrc_data->height,
+		rsrc_data->stride, rsrc_data->format, rsrc_data->en_ubwc,
+		wm_mode);
 	return 0;
 }
 
@@ -1426,8 +1427,9 @@ static int cam_vfe_bus_ver3_release_wm(void   *bus_priv,
 	wm_res->tasklet_info = NULL;
 	wm_res->res_state = CAM_ISP_RESOURCE_STATE_AVAILABLE;
 
-	CAM_DBG(CAM_ISP, "VFE:%d Release WM:%d",
-		rsrc_data->common_data->core_index, rsrc_data->index);
+	CAM_DBG(CAM_ISP, "VFE:%d Release WM:%d %s",
+		rsrc_data->common_data->core_index, rsrc_data->index,
+		wm_res->res_name);
 
 	return 0;
 }
@@ -1484,10 +1486,10 @@ static int cam_vfe_bus_ver3_start_wm(struct cam_isp_resource_node *wm_res)
 		rsrc_data->hw_regs->debug_status_cfg);
 
 	CAM_DBG(CAM_ISP,
-		"Start VFE:%d WM:%d offset:0x%X en_cfg:0x%X width:%d height:%d",
+		"Start VFE:%d WM:%d %s offset:0x%X en_cfg:0x%X width:%d height:%d",
 		rsrc_data->common_data->core_index, rsrc_data->index,
-		(uint32_t) rsrc_data->hw_regs->cfg, rsrc_data->en_cfg,
-		rsrc_data->width, rsrc_data->height);
+		wm_res->res_name, (uint32_t) rsrc_data->hw_regs->cfg,
+		rsrc_data->en_cfg, rsrc_data->width, rsrc_data->height);
 	CAM_DBG(CAM_ISP, "WM:%d pk_fmt:%d stride:%d burst len:%d",
 		rsrc_data->index, rsrc_data->pack_fmt,
 		rsrc_data->stride, 0xF);
@@ -1506,8 +1508,9 @@ static int cam_vfe_bus_ver3_stop_wm(struct cam_isp_resource_node *wm_res)
 
 	/* Disable WM */
 	cam_io_w_mb(0x0, common_data->mem_base + rsrc_data->hw_regs->cfg);
-	CAM_DBG(CAM_ISP, "Stop VFE:%d WM:%d",
-		rsrc_data->common_data->core_index, rsrc_data->index);
+	CAM_DBG(CAM_ISP, "Stop VFE:%d WM:%d %s",
+		rsrc_data->common_data->core_index, rsrc_data->index,
+		wm_res->res_name);
 
 	wm_res->res_state = CAM_ISP_RESOURCE_STATE_RESERVED;
 	rsrc_data->init_cfg_done = false;
@@ -1532,7 +1535,8 @@ static int cam_vfe_bus_ver3_handle_wm_done_bottom_half(void *wm_node,
 static int cam_vfe_bus_ver3_init_wm_resource(uint32_t index,
 	struct cam_vfe_bus_ver3_priv    *ver3_bus_priv,
 	struct cam_vfe_bus_ver3_hw_info *ver3_hw_info,
-	struct cam_isp_resource_node    *wm_res)
+	struct cam_isp_resource_node    *wm_res,
+	uint8_t                         *wm_name)
 {
 	struct cam_vfe_bus_ver3_wm_resource_data *rsrc_data;
 
@@ -1558,6 +1562,9 @@ static int cam_vfe_bus_ver3_init_wm_resource(uint32_t index,
 		cam_vfe_bus_ver3_handle_wm_done_bottom_half;
 	wm_res->hw_intf = ver3_bus_priv->common_data.hw_intf;
 
+	if (wm_name)
+		scnprintf(wm_res->res_name, CAM_ISP_RES_NAME_LEN,
+			"%s", wm_name);
 	return 0;
 }
 
@@ -2555,7 +2562,8 @@ static int cam_vfe_bus_ver3_init_vfe_out_resource(uint32_t  index,
 		rc = cam_vfe_bus_ver3_init_wm_resource(
 			ver3_hw_info->vfe_out_hw_info[index].wm_idx[i],
 			ver3_bus_priv, ver3_hw_info,
-			&rsrc_data->wm_res[i]);
+			&rsrc_data->wm_res[i],
+			ver3_hw_info->vfe_out_hw_info[index].name[i]);
 		if (rc < 0) {
 			CAM_ERR(CAM_ISP, "VFE:%d init WM:%d failed rc:%d",
 				ver3_bus_priv->common_data.core_index, i, rc);

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.h

@@ -178,6 +178,7 @@ struct cam_vfe_bus_ver3_vfe_out_hw_info {
 	uint32_t                         mid[CAM_VFE_BUS_VER3_MAX_MID_PER_PORT];
 	uint32_t                            num_wm;
 	uint32_t                            wm_idx[PLANE_MAX];
+	uint8_t                            *name[PLANE_MAX];
 };
 
 /*

+ 34 - 23
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_lite_ver3.c

@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
  */
 
 #include <linux/slab.h>
@@ -185,7 +185,8 @@ static int cam_vfe_camif_lite_get_reg_update(
 		return -EINVAL;
 	}
 
-	CAM_DBG(CAM_ISP, "CAMIF LITE:%d get RUP", camif_lite_res->res_id);
+	CAM_DBG(CAM_ISP, "CAMIF LITE:%d %s get RUP", camif_lite_res->res_id,
+		camif_lite_res->res_name);
 
 	cdm_util_ops = (struct cam_cdm_utils_ops *)cdm_args->res->cdm_ops;
 
@@ -205,8 +206,9 @@ static int cam_vfe_camif_lite_get_reg_update(
 	rsrc_data = camif_lite_res->res_priv;
 	reg_val_pair[0] = rsrc_data->camif_lite_reg->reg_update_cmd;
 	reg_val_pair[1] = rsrc_data->reg_data->reg_update_cmd_data;
-	CAM_DBG(CAM_ISP, "CAMIF LITE:%d reg_update_cmd 0x%X offset 0x%X",
-		camif_lite_res->res_id, reg_val_pair[1], reg_val_pair[0]);
+	CAM_DBG(CAM_ISP, "CAMIF LITE:%d %s reg_update_cmd 0x%X offset 0x%X",
+		camif_lite_res->res_id, camif_lite_res->res_name,
+		reg_val_pair[1], reg_val_pair[0]);
 
 	cdm_util_ops->cdm_write_regrandom(cdm_args->cmd.cmd_buf_addr,
 		1, reg_val_pair);
@@ -236,9 +238,10 @@ int cam_vfe_camif_lite_ver3_acquire_resource(
 	camif_lite_data->event_cb    = acquire_data->event_cb;
 	camif_lite_data->priv        = acquire_data->priv;
 	camif_lite_res->rdi_only_ctx = 0;
-	CAM_DBG(CAM_ISP, "Acquired VFE:%d CAMIF LITE:%d sync_mode=%d",
+	CAM_DBG(CAM_ISP, "Acquired VFE:%d CAMIF LITE:%d %s sync_mode=%d",
 		camif_lite_res->hw_intf->hw_idx,
 		camif_lite_res->res_id,
+		camif_lite_res->res_name,
 		camif_lite_data->sync_mode);
 	return 0;
 }
@@ -264,7 +267,8 @@ static int cam_vfe_camif_lite_resource_start(
 		return -EINVAL;
 	}
 
-	CAM_DBG(CAM_ISP, "CAMIF LITE:%d Start", camif_lite_res->res_id);
+	CAM_DBG(CAM_ISP, "CAMIF LITE:%d %s Start", camif_lite_res->res_id,
+		camif_lite_res->res_name);
 
 	rsrc_data = (struct cam_vfe_mux_camif_lite_data *)
 		camif_lite_res->res_priv;
@@ -397,9 +401,9 @@ subscribe_err:
 		}
 	}
 
-	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d Start Done",
+	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d %s Start Done",
 		camif_lite_res->hw_intf->hw_idx,
-		camif_lite_res->res_id);
+		camif_lite_res->res_id, camif_lite_res->res_name);
 	return rc;
 }
 
@@ -672,9 +676,10 @@ static int cam_vfe_camif_lite_resource_stop(
 		return -EINVAL;
 	}
 
-	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d Stop",
+	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d %s Stop",
 		camif_lite_res->hw_intf->hw_idx,
-		camif_lite_res->res_id);
+		camif_lite_res->res_id,
+		camif_lite_res->res_name);
 
 	if ((camif_lite_res->res_state == CAM_ISP_RESOURCE_STATE_RESERVED) ||
 		(camif_lite_res->res_state == CAM_ISP_RESOURCE_STATE_AVAILABLE))
@@ -1065,9 +1070,10 @@ static int cam_vfe_camif_lite_handle_irq_top_half(uint32_t evt_id,
 	camif_lite_priv = camif_lite_node->res_priv;
 
 	CAM_DBG(CAM_ISP,
-		"VFE:%d CAMIF LITE:%d IRQ status_0: 0x%X status_1: 0x%X status_2: 0x%X",
+		"VFE:%d CAMIF LITE:%d %s IRQ status_0: 0x%X status_1: 0x%X status_2: 0x%X",
 		camif_lite_node->hw_intf->hw_idx,
 		camif_lite_node->res_id,
+		camif_lite_node->res_name,
 		th_payload->evt_status_arr[0],
 		th_payload->evt_status_arr[1],
 		th_payload->evt_status_arr[2]);
@@ -1133,16 +1139,17 @@ static int cam_vfe_camif_lite_handle_irq_bottom_half(
 	evt_info.res_type = camif_lite_node->res_type;
 
 	CAM_DBG(CAM_ISP,
-		"VFE:%d CAMIF LITE:%d IRQ status_0: 0x%X status_1: 0x%X status_2: 0x%X",
-		evt_info.hw_idx, evt_info.res_id,
+		"VFE:%d CAMIF LITE:%d %s IRQ status_0: 0x%X status_1: 0x%X status_2: 0x%X",
+		evt_info.hw_idx, evt_info.res_id, camif_lite_node->res_name,
 		irq_status[CAM_IFE_IRQ_CAMIF_REG_STATUS0],
 		irq_status[CAM_IFE_IRQ_CAMIF_REG_STATUS1],
 		irq_status[CAM_IFE_IRQ_CAMIF_REG_STATUS2]);
 
 	if (irq_status[CAM_IFE_IRQ_CAMIF_REG_STATUS1]
 		& camif_lite_priv->reg_data->sof_irq_mask) {
-		CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d Received SOF",
-			evt_info.hw_idx, evt_info.res_id);
+		CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d %s Received SOF",
+			evt_info.hw_idx, evt_info.res_id,
+			camif_lite_node->res_name);
 		ret = CAM_VFE_IRQ_STATUS_SUCCESS;
 		camif_lite_priv->sof_ts.tv_sec =
 			payload->ts.mono_time.tv_sec;
@@ -1156,8 +1163,9 @@ static int cam_vfe_camif_lite_handle_irq_bottom_half(
 
 	if (irq_status[CAM_IFE_IRQ_CAMIF_REG_STATUS1]
 		& camif_lite_priv->reg_data->epoch0_irq_mask) {
-		CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d Received EPOCH",
-			evt_info.hw_idx, evt_info.res_id);
+		CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d %s Received EPOCH",
+			evt_info.hw_idx, evt_info.res_id,
+			camif_lite_node->res_name);
 		ret = CAM_VFE_IRQ_STATUS_SUCCESS;
 		camif_lite_priv->epoch_ts.tv_sec =
 			payload->ts.mono_time.tv_sec;
@@ -1171,8 +1179,9 @@ static int cam_vfe_camif_lite_handle_irq_bottom_half(
 
 	if (irq_status[CAM_IFE_IRQ_CAMIF_REG_STATUS1]
 		& camif_lite_priv->reg_data->eof_irq_mask) {
-		CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d Received EOF",
-			evt_info.hw_idx, evt_info.res_id);
+		CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d %s Received EOF",
+			evt_info.hw_idx, evt_info.res_id,
+			camif_lite_node->res_name);
 		ret = CAM_VFE_IRQ_STATUS_SUCCESS;
 		camif_lite_priv->eof_ts.tv_sec =
 			payload->ts.mono_time.tv_sec;
@@ -1275,8 +1284,9 @@ int cam_vfe_camif_lite_ver3_init(
 		camif_lite_hw_info;
 	int                                       i = 0;
 
-	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d Init",
-		camif_lite_node->res_id, camif_lite_node->res_id);
+	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d %s Init",
+		camif_lite_node->res_id, camif_lite_node->res_id,
+		camif_lite_node->res_name);
 
 	camif_lite_priv = kzalloc(sizeof(*camif_lite_priv),
 		GFP_KERNEL);
@@ -1322,8 +1332,9 @@ int cam_vfe_camif_lite_ver3_deinit(
 		camif_lite_node->res_priv;
 	int                                 i = 0;
 
-	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d Deinit",
-		camif_lite_node->hw_intf->hw_idx, camif_lite_node->res_id);
+	CAM_DBG(CAM_ISP, "VFE:%d CAMIF LITE:%d %s Deinit",
+		camif_lite_node->hw_intf->hw_idx, camif_lite_node->res_id,
+		camif_lite_node->res_name);
 
 	INIT_LIST_HEAD(&camif_lite_priv->free_payload_list);
 	for (i = 0; i < CAM_VFE_CAMIF_LITE_EVT_MAX; i++)

+ 17 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver3.c

@@ -565,6 +565,10 @@ int cam_vfe_top_ver3_reserve(void *device_priv,
 				&top_priv->top_common.mux_rsrc[i];
 
 			rc = 0;
+			CAM_DBG(CAM_ISP, "VFE[%u] Res [id:%d name:%s] reserved",
+				top_priv->common_data.hw_intf->hw_idx,
+				acquire_args->res_id,
+				top_priv->top_common.mux_rsrc[i].res_name);
 			break;
 		}
 	}
@@ -587,7 +591,8 @@ int cam_vfe_top_ver3_release(void *device_priv,
 	top_priv = (struct cam_vfe_top_ver3_priv   *)device_priv;
 	mux_res = (struct cam_isp_resource_node *)release_args;
 
-	CAM_DBG(CAM_ISP, "Resource in state %d", mux_res->res_state);
+	CAM_DBG(CAM_ISP, "%s Resource in state %d", mux_res->res_name,
+		mux_res->res_state);
 	if (mux_res->res_state < CAM_ISP_RESOURCE_STATE_RESERVED) {
 		CAM_ERR(CAM_ISP, "Error, Resource in Invalid res_state :%d",
 			mux_res->res_state);
@@ -851,6 +856,8 @@ int cam_vfe_top_ver3_init(
 				&ver3_hw_info->camif_hw_info,
 				&top_priv->top_common.mux_rsrc[i],
 				vfe_irq_controller);
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "CAMIF");
 			if (rc)
 				goto deinit_resources;
 		} else if (ver3_hw_info->mux_type[i] ==
@@ -863,6 +870,8 @@ int cam_vfe_top_ver3_init(
 				&ver3_hw_info->pdlib_hw_info,
 				&top_priv->top_common.mux_rsrc[i],
 				vfe_irq_controller);
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "PDLIB");
 			if (rc)
 				goto deinit_resources;
 		} else if (ver3_hw_info->mux_type[i] ==
@@ -874,6 +883,8 @@ int cam_vfe_top_ver3_init(
 			rc = cam_vfe_fe_ver1_init(hw_intf, soc_info,
 				&ver3_hw_info->fe_hw_info,
 				&top_priv->top_common.mux_rsrc[i]);
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "IN_RD");
 			if (rc)
 				goto deinit_resources;
 		} else if (ver3_hw_info->mux_type[i] ==
@@ -882,6 +893,9 @@ int cam_vfe_top_ver3_init(
 			top_priv->top_common.mux_rsrc[i].res_id =
 				CAM_ISP_HW_VFE_IN_RDI0 + j;
 
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "RDI_%d", j);
+
 			rc = cam_vfe_camif_lite_ver3_init(hw_intf, soc_info,
 				ver3_hw_info->rdi_hw_info[j++],
 				&top_priv->top_common.mux_rsrc[i],
@@ -898,6 +912,8 @@ int cam_vfe_top_ver3_init(
 				&ver3_hw_info->lcr_hw_info,
 				&top_priv->top_common.mux_rsrc[i],
 				vfe_irq_controller);
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "LCR");
 			if (rc)
 				goto deinit_resources;
 		} else {

+ 23 - 2
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.c

@@ -1195,8 +1195,10 @@ int cam_vfe_top_acquire_resource(
 
 config_done:
 	CAM_DBG(CAM_ISP,
-		"VFE:%d pix_pattern:%d dsp_mode=%d is_dual:%d dual_hw_idx:%d",
+		"VFE:%d Res:[id:%d name:%s] pix_pattern:%d dsp_mode=%d is_dual:%d dual_hw_idx:%d",
 		vfe_full_res->hw_intf->hw_idx,
+		vfe_full_res->res_id,
+		vfe_full_res->res_name,
 		res_data->pix_pattern, res_data->dsp_mode,
 		res_data->is_dual, res_data->dual_hw_idx);
 
@@ -1933,7 +1935,9 @@ subscribe_err:
 		}
 	}
 
-	CAM_DBG(CAM_ISP, "VFE:%d Start Done", vfe_res->hw_intf->hw_idx);
+	CAM_DBG(CAM_ISP, "VFE:%d Res: %s Start Done",
+		vfe_res->hw_intf->hw_idx,
+		vfe_res->res_name);
 
 	return rc;
 }
@@ -2000,6 +2004,10 @@ skip_core_decfg:
 		vfe_priv->irq_err_handle = 0;
 	}
 
+	CAM_DBG(CAM_ISP, "VFE:%d Res: %s Stopped",
+		vfe_res->hw_intf->hw_idx,
+		vfe_res->res_name);
+
 	return rc;
 }
 
@@ -2036,6 +2044,10 @@ static int cam_vfe_resource_init(
 	rsrc_data->error_ts.tv_sec = 0;
 	rsrc_data->error_ts.tv_nsec = 0;
 
+	CAM_DBG(CAM_ISP, "VFE:%d Res: %s Init Done",
+		vfe_res->hw_intf->hw_idx,
+		vfe_res->res_name);
+
 	return rc;
 }
 
@@ -2062,6 +2074,9 @@ static int cam_vfe_resource_deinit(
 			CAM_ERR(CAM_ISP, "failed to disable dsp clk");
 	}
 
+	CAM_DBG(CAM_ISP, "VFE:%d Res: %s DeInit Done",
+		vfe_res->hw_intf->hw_idx,
+		vfe_res->res_name);
 	return rc;
 }
 
@@ -2203,6 +2218,8 @@ int cam_vfe_top_ver4_init(
 				&hw_info->vfe_full_hw_info,
 				&top_priv->top_common.mux_rsrc[i],
 				vfe_irq_controller);
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "CAMIF");
 		} else if (hw_info->mux_type[i] ==
 			CAM_VFE_PDLIB_VER_1_0) {
 			/* set the PDLIB resource id */
@@ -2214,12 +2231,16 @@ int cam_vfe_top_ver4_init(
 				&hw_info->pdlib_hw_info,
 				&top_priv->top_common.mux_rsrc[i],
 				vfe_irq_controller);
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "PDLIB");
 		} else if (hw_info->mux_type[i] ==
 			CAM_VFE_RDI_VER_1_0) {
 			/* set the RDI resource id */
 			top_priv->top_common.mux_rsrc[i].res_id =
 				CAM_ISP_HW_VFE_IN_RDI0 + j;
 
+			scnprintf(top_priv->top_common.mux_rsrc[i].res_name,
+				CAM_ISP_RES_NAME_LEN, "RDI_%d", j);
 			rc = cam_vfe_res_mux_init(top_priv,
 				hw_intf, soc_info,
 				hw_info->rdi_hw_info[j++],