Bläddra i källkod

msm: camera: isp: Fix issue while printing hbi and vbi

Fix the parameters during printing of hbi and vbi from CSID
registers.

CRs-Fixed: 2927523
Change-Id: I2da3f0eaea16ebf2ec2683a52a433d16cbaf1eb8
Signed-off-by: Gaurav Jindal <[email protected]>
Gaurav Jindal 4 år sedan
förälder
incheckning
33e4d6ea26

+ 2 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid480.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_IFE_CSID_480_H_
@@ -486,6 +486,7 @@ static struct cam_ife_csid_ver1_common_reg_info
 	.num_pix                         = 1,
 	.num_ppp                         = 1,
 	.drop_supported                  = 1,
+	.early_eof_supported             = 1,
 	.rst_sw_reg_stb                  = 1,
 	.rst_hw_reg_stb                  = 0x1e,
 	.rst_sw_hw_reg_stb               = 0x1f,

+ 2 - 2
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid680.h

@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
  */
 
 #ifndef _CAM_IFE_CSID_680_H_
@@ -884,7 +884,7 @@ static struct cam_ife_csid_ver2_common_reg_info
 	.vfr_supported                           = 1,
 	.multi_vcdt_supported                    = 1,
 	.frame_id_dec_supported                  = 1,
-	.measure_en_hbi_vbi_cnt_mask             = 0xc,
+	.measure_en_hbi_vbi_cnt_mask             = 0x1c,
 	.measure_pixel_line_en_mask              = 0x3,
 	.crop_pix_start_mask                     = 0x3fff,
 	.crop_pix_end_mask                       = 0xffff,

+ 9 - 7
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.c

@@ -3374,14 +3374,14 @@ static int cam_ife_csid_ver1_print_hbi_vbi(
 
 	if (res->res_type != CAM_ISP_RESOURCE_PIX_PATH ||
 		res->res_id >= CAM_IFE_PIX_PATH_RES_MAX) {
-		CAM_DBG(CAM_ISP, "CSID:%d Invalid res_type:%d res id%d",
+		CAM_DBG(CAM_ISP, "CSID[%u] Invalid res_type:%d res [id: %d name: %s]",
 			csid_hw->hw_intf->hw_idx, res->res_type,
-			res->res_id);
+			res->res_id, res->res_name);
 		return -EINVAL;
 	}
 
 	if (csid_hw->hw_info->hw_state != CAM_HW_STATE_POWER_UP) {
-		CAM_ERR(CAM_ISP, "CSID:%d Invalid dev state :%d",
+		CAM_ERR(CAM_ISP, "CSID[%u] Invalid dev state :%d",
 			csid_hw->hw_intf->hw_idx,
 			csid_hw->hw_info->hw_state);
 		return -EINVAL;
@@ -3402,13 +3402,13 @@ static int cam_ife_csid_ver1_print_hbi_vbi(
 		path_reg = csid_reg->rdi_reg[res->res_id];
 		break;
 	default:
-		CAM_ERR(CAM_ISP, "CSID:%d invalid res %d",
+		CAM_ERR(CAM_ISP, "CSID[%u] invalid res %d",
 			csid_hw->hw_intf->hw_idx, res->res_id);
 		return -EINVAL;
 	}
 
 	if (!path_reg) {
-		CAM_ERR(CAM_ISP, "CSID:%d invalid res %d",
+		CAM_ERR(CAM_ISP, "CSID[%u] invalid res: %d",
 			csid_hw->hw_intf->hw_idx, res->res_id);
 		return -EINVAL;
 	}
@@ -3417,8 +3417,10 @@ static int cam_ife_csid_ver1_print_hbi_vbi(
 		path_reg->format_measure1_addr);
 	vbi = cam_io_r_mb(soc_info->reg_map[0].mem_base +
 		path_reg->format_measure2_addr);
-	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] res[id: %d name: %s] hbi 0x%x vbi 0x%x",
+		csid_hw->hw_intf->hw_idx, res->res_id, res->res_name,
+		hbi, vbi);
 
 	return 0;
 }

+ 9 - 6
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c

@@ -3988,14 +3988,15 @@ static int cam_ife_csid_ver2_print_hbi_vbi(
 
 	if (res->res_type != CAM_ISP_RESOURCE_PIX_PATH ||
 		res->res_id >= CAM_IFE_PIX_PATH_RES_MAX) {
-		CAM_DBG(CAM_ISP, "CSID:%d Invalid res_type:%d res id%d",
+		CAM_DBG(CAM_ISP,
+			"CSID[%u] Invalid res_type:%d res [id: %d name: %s]",
 			csid_hw->hw_intf->hw_idx, res->res_type,
-			res->res_id);
+			res->res_id, res->res_name);
 		return -EINVAL;
 	}
 
 	if (csid_hw->hw_info->hw_state != CAM_HW_STATE_POWER_UP) {
-		CAM_ERR(CAM_ISP, "CSID:%d Invalid dev state :%d",
+		CAM_ERR(CAM_ISP, "CSID[%u] Invalid dev state :%d",
 			csid_hw->hw_intf->hw_idx,
 			csid_hw->hw_info->hw_state);
 		return -EINVAL;
@@ -4025,13 +4026,15 @@ static int cam_ife_csid_ver2_print_hbi_vbi(
 			csid_reg->rdi_reg[res->res_id]->format_measure2_addr);
 	break;
 	default:
-		CAM_ERR(CAM_ISP, "CSID:%d invalid res %d",
+		CAM_ERR(CAM_ISP, "CSID[%u] invalid res: %d",
 			csid_hw->hw_intf->hw_idx, res->res_id);
 		return -EINVAL;
 	}
 
-	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);
+	CAM_INFO_RATE_LIMIT(CAM_ISP,
+		"CSID[%u] Resource[id:%d name:%s] hbi 0x%x vbi 0x%x",
+		csid_hw->hw_intf->hw_idx, res->res_id, res->res_name,
+		hbi, vbi);
 
 	return 0;
 }