ソースを参照

msm: camera: isp: Register only one irq handler for rdi only context

If RDI only context has two rdi ports enabled, then register
single irq handler for both ports.
This change help registering only one irq handlers for
rdi only context.

CRs-Fixed: 2521064
Change-Id: I201cf62b73dbfb20636821213afc7f2a4d6cf13c
Signed-off-by: Ravikishore Pampana <[email protected]>
Ravikishore Pampana 5 年 前
コミット
2424e34228

+ 16 - 2
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -335,8 +335,6 @@ static int cam_ife_hw_mgr_start_hw_res(
 			continue;
 		hw_intf = isp_hw_res->hw_res[i]->hw_intf;
 		if (hw_intf->hw_ops.start) {
-			isp_hw_res->hw_res[i]->rdi_only_ctx =
-				ctx->is_rdi_only_context;
 			rc = hw_intf->hw_ops.start(hw_intf->hw_priv,
 				isp_hw_res->hw_res[i],
 				sizeof(struct cam_isp_resource_node));
@@ -3843,6 +3841,7 @@ static int cam_ife_mgr_start_hw(void *hw_mgr_priv, void *start_hw_args)
 	struct cam_ife_hw_mgr_res        *hw_mgr_res;
 	struct cam_isp_resource_node     *rsrc_node = NULL;
 	uint32_t                          i, camif_debug;
+	bool                              res_rdi_context_set = false;
 
 	if (!hw_mgr_priv || !start_isp) {
 		CAM_ERR(CAM_ISP, "Invalid arguments");
@@ -3967,6 +3966,21 @@ start_only:
 		ctx->ctx_index);
 	/* Start the IFE mux in devices */
 	list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) {
+		switch (hw_mgr_res->res_id) {
+		case CAM_ISP_HW_VFE_IN_RDI0:
+		case CAM_ISP_HW_VFE_IN_RDI1:
+		case CAM_ISP_HW_VFE_IN_RDI2:
+		case CAM_ISP_HW_VFE_IN_RDI3:
+			if (!res_rdi_context_set) {
+				hw_mgr_res->hw_res[0]->rdi_only_ctx =
+				ctx->is_rdi_only_context;
+				res_rdi_context_set = true;
+			}
+			break;
+		default:
+			break;
+		}
+
 		rc = cam_ife_hw_mgr_start_hw_res(hw_mgr_res, ctx);
 		if (rc) {
 			CAM_ERR(CAM_ISP, "Can not start IFE MUX (%d)",

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

@@ -225,7 +225,7 @@ int cam_vfe_camif_lite_ver3_acquire_resource(
 	camif_lite_data->sync_mode   = acquire_data->vfe_in.sync_mode;
 	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",
 		camif_lite_res->hw_intf->hw_idx,
 		camif_lite_res->res_id,

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_rdi.c

@@ -201,6 +201,7 @@ int cam_vfe_rdi_ver2_acquire_resource(
 	rdi_data->event_cb    = acquire_data->event_cb;
 	rdi_data->priv        = acquire_data->priv;
 	rdi_data->sync_mode   = acquire_data->vfe_in.sync_mode;
+	rdi_res->rdi_only_ctx = 0;
 
 	return 0;
 }