Ver Fonte

Merge "msm: camera: common: Add HW version checks for v680 hardware" into camera-kernel.lnx.5.0

Haritha Chintalapati há 4 anos atrás
pai
commit
83817bb001

+ 3 - 2
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

@@ -6432,8 +6432,9 @@ int cam_icp_hw_mgr_init(struct device_node *of_node, uint64_t *hw_mgr_hdl,
 
 	if ((camera_hw_version == CAM_CPAS_TITAN_480_V100) ||
 		(camera_hw_version == CAM_CPAS_TITAN_580_V100) ||
-		(camera_hw_version == CAM_CPAS_TITAN_570_V200)) {
-		if (cam_caps & CPAS_TITAN_480_IPE0_BIT)
+		(camera_hw_version == CAM_CPAS_TITAN_570_V200) ||
+		(camera_hw_version == CAM_CPAS_TITAN_680_V100)) {
+		if (cam_caps & CPAS_TITAN_IPE0_CAP_BIT)
 			icp_hw_mgr.ipe0_enable = true;
 		if (cam_caps & CPAS_BPS_BIT)
 			icp_hw_mgr.bps_enable = true;

+ 3 - 1
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.h

@@ -51,7 +51,9 @@
 #define CPAS_IPE0_BIT           0x1000
 #define CPAS_IPE1_BIT           0x2000
 #define CPAS_BPS_BIT            0x400
-#define CPAS_TITAN_480_IPE0_BIT 0x800
+
+/* Used for targets >= 480 and its variants */
+#define CPAS_TITAN_IPE0_CAP_BIT 0x800
 
 #define ICP_PWR_CLP_BPS         0x00000001
 #define ICP_PWR_CLP_IPE0        0x00010000

+ 18 - 0
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -1885,6 +1885,24 @@ static int cam_convert_hw_idx_to_ife_hw_num(int hw_idx)
 			else if (hw_idx == 6)
 				return CAM_ISP_IFE4_LITE_HW;
 			break;
+		case CAM_CPAS_TITAN_680_V100:
+			if (hw_idx == 0)
+				return CAM_ISP_IFE0_HW;
+			else if (hw_idx == 1)
+				return CAM_ISP_IFE1_HW;
+			else if (hw_idx == 2)
+				return CAM_ISP_IFE2_HW;
+			else if (hw_idx == 3)
+				return CAM_ISP_IFE0_LITE_HW;
+			else if (hw_idx == 4)
+				return CAM_ISP_IFE1_LITE_HW;
+			else if (hw_idx == 5)
+				return CAM_ISP_IFE2_LITE_HW;
+			else if (hw_idx == 6)
+				return CAM_ISP_IFE3_LITE_HW;
+			else if (hw_idx == 7)
+				return CAM_ISP_IFE4_LITE_HW;
+			break;
 		case CAM_CPAS_TITAN_580_V100:
 		case CAM_CPAS_TITAN_570_V200:
 		case CAM_CPAS_TITAN_165_V100:

+ 2 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_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>
@@ -468,6 +468,7 @@ static int cam_vfe_camif_ver3_resource_start(
 	case CAM_CPAS_TITAN_480_V100:
 	case CAM_CPAS_TITAN_580_V100:
 	case CAM_CPAS_TITAN_570_V200:
+	case CAM_CPAS_TITAN_680_V100:
 		epoch0_line_cfg = ((rsrc_data->last_line +
 			rsrc_data->vbi_value) -
 			rsrc_data->first_line) / 4;