Selaa lähdekoodia

msm: camera: isp: Get hint for FS mode from UMD

In case of SFE FS mode, SFE PP needs to be bypassed by
programming sfe_offline_en in CSID wrapper. Get this
hint from UMD to differentiate between sHDR & FS use-cases.

CRs-Fixed: 2841729
Change-Id: If118440be2066c50871785f2077c69cff126d0f7
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram 4 vuotta sitten
vanhempi
sitoutus
ce0aadce82

+ 10 - 4
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -3394,8 +3394,15 @@ static int cam_ife_mgr_check_and_update_fe_v2(
 			((in_port->sfe_in_path_type & 0xFFFF) == CAM_ISP_SFE_IN_RD_1) ||
 			((in_port->sfe_in_path_type & 0xFFFF) == CAM_ISP_SFE_IN_RD_2)) {
 			ife_ctx->is_fe_enabled = true;
+
+			/* Check for SFE FS mode - SFE PP bypass */
+			if (in_port->feature_flag & CAM_ISP_SFE_FS_MODE_EN)
+				ife_ctx->ctx_config |= CAM_IFE_CTX_CFG_SFE_FS_MODE;
+
+			/* Check for offline */
 			if (in_port->offline_mode)
 				ife_ctx->is_offline = true;
+
 			break;
 		}
 
@@ -4599,11 +4606,9 @@ static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
 			CAM_IFE_CTX_CONSUME_ADDR_EN;
 
 	if ((ife_ctx->ctx_type == CAM_IFE_CTX_TYPE_SFE) &&
-		ife_ctx->is_fe_enabled) {
-		ife_ctx->ctx_config |= CAM_IFE_CTX_CFG_SFE_FE_MODE;
+		(ife_ctx->is_fe_enabled) && (!ife_ctx->is_offline))
 		acquire_args->op_flags |=
 			CAM_IFE_CTX_APPLY_DEFAULT_CFG;
-	}
 
 	acquire_args->ctxt_to_hw_map = ife_ctx;
 	if (ife_ctx->ctx_type == CAM_IFE_CTX_TYPE_CUSTOM)
@@ -6020,7 +6025,8 @@ static int cam_ife_mgr_start_hw(void *hw_mgr_priv, void *start_hw_args)
 						CAM_IFE_CSID_INPUT_CORE_IFE;
 				}
 
-				if (ctx->is_offline)
+				if ((ctx->is_offline) ||
+					(ctx->ctx_config & CAM_IFE_CTX_CFG_SFE_FS_MODE))
 					csid_top_args.is_sfe_offline = true;
 
 				hw_intf = hw_mgr_res->hw_res[i]->hw_intf;

+ 1 - 1
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h

@@ -36,7 +36,7 @@ enum cam_ife_ctx_master_type {
 /* IFE_HW_MGR ctx config */
 #define CAM_IFE_CTX_CFG_FRAME_HEADER_TS   BIT(0)
 #define CAM_IFE_CTX_CFG_SW_SYNC_ON        BIT(1)
-#define CAM_IFE_CTX_CFG_SFE_FE_MODE       BIT(2)
+#define CAM_IFE_CTX_CFG_SFE_FS_MODE       BIT(2)
 #define CAM_IFE_CTX_CFG_DYNAMIC_SWITCH_ON BIT(3)
 
 #define CAM_IFE_UBWC_COMP_EN                 BIT(1)

+ 1 - 0
include/uapi/camera/media/cam_isp.h

@@ -170,6 +170,7 @@
 #define CAM_ISP_DYNAMIC_SENOR_SWITCH_EN        BIT(2)
 #define CAM_ISP_SFE_BINNED_EPOCH_CFG_ENABLE    BIT(3)
 #define CAM_ISP_EPD_SUPPORT                    BIT(4)
+#define CAM_ISP_SFE_FS_MODE_EN                 BIT(5)
 
 /* ISP core cfg flag params */
 #define CAM_ISP_PARAM_CORE_CFG_HDR_MUX_SEL BIT(0)