Browse Source

Merge "msm: camera: isp: Enable IFE Bus violation IRQ" into camera-kernel.lnx.5.0

Haritha Chintalapati 3 years ago
parent
commit
24a017483d

+ 1 - 3
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -11063,6 +11063,7 @@ static int cam_ife_mgr_process_recovery_cb(void *priv, void *data)
 	switch (error_type) {
 	case CAM_ISP_HW_ERROR_OVERFLOW:
 	case CAM_ISP_HW_ERROR_BUSIF_OVERFLOW:
+	case CAM_ISP_HW_ERROR_VIOLATION:
 		if (!recovery_data->affected_ctx[0]) {
 			CAM_ERR(CAM_ISP,
 				"No context is affected but recovery called");
@@ -11127,9 +11128,6 @@ static int cam_ife_mgr_process_recovery_cb(void *priv, void *data)
 	case CAM_ISP_HW_ERROR_P2I_ERROR:
 		break;
 
-	case CAM_ISP_HW_ERROR_VIOLATION:
-		break;
-
 	default:
 		CAM_ERR(CAM_ISP, "Invalid Error");
 	}

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

@@ -2039,7 +2039,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe680_bus_hw_info = {
 	.num_comp_grp          = 17,
 	.support_consumed_addr = true,
 	.comp_done_shift       = 0,
-	.top_irq_shift         = 1,
+	.top_irq_shift         = 0,
 	.max_out_res           = CAM_ISP_IFE_OUT_RES_BASE + 33,
 	.pack_align_shift      = 5,
 	.max_bw_counter_limit  = 0xFF,

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

@@ -2021,7 +2021,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe780_bus_hw_info = {
 	.num_comp_grp    = 15,
 	.support_consumed_addr = true,
 	.comp_done_shift = 0,
-	.top_irq_shift   = 1,
+	.top_irq_shift   = 0,
 	.max_out_res = CAM_ISP_IFE_OUT_RES_BASE + 35,
 	.pack_align_shift = 5,
 };

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

@@ -490,7 +490,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe680x_bus_hw_info = {
 	.num_comp_grp    = 5,
 	.support_consumed_addr = true,
 	.comp_done_shift = 0,
-	.top_irq_shift   = 1,
+	.top_irq_shift   = 0,
 	.max_out_res = CAM_ISP_IFE_OUT_RES_BASE + 33,
 };
 

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

@@ -485,7 +485,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe_lite78x_bus_hw_info = {
 	.num_comp_grp    = 5,
 	.support_consumed_addr = true,
 	.comp_done_shift = 0,
-	.top_irq_shift   = 1,
+	.top_irq_shift   = 0,
 	.max_out_res = CAM_ISP_IFE_OUT_RES_BASE + 34,
 };
 

+ 4 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -82,6 +82,7 @@ struct cam_vfe_bus_ver3_common_data {
 	void                                       *rup_irq_controller;
 	void                                       *vfe_irq_controller;
 	void                                       *buf_done_controller;
+	void                                       *priv;
 	struct cam_vfe_bus_ver3_reg_offset_common  *common_reg;
 	uint32_t                                    io_buf_update[
 		MAX_REG_VAL_PAIR_SIZE];
@@ -1932,6 +1933,7 @@ static int cam_vfe_bus_ver3_acquire_vfe_out(void *bus_priv, void *acquire_args,
 
 	rsrc_data = rsrc_node->res_priv;
 	rsrc_data->common_data->event_cb = acq_args->event_cb;
+	rsrc_data->common_data->priv = acq_args->priv;
 	rsrc_data->common_data->disable_ubwc_comp =
 		out_acquire_args->disable_ubwc_comp;
 	rsrc_data->priv = acq_args->priv;
@@ -2778,9 +2780,10 @@ static int cam_vfe_bus_ver3_err_irq_bottom_half(
 	evt_info.res_type = CAM_ISP_RESOURCE_VFE_OUT;
 	evt_info.res_id = CAM_VFE_BUS_VER3_VFE_OUT_MAX;
 	evt_info.err_type = CAM_VFE_IRQ_STATUS_VIOLATION;
+	evt_info.hw_type = CAM_ISP_HW_TYPE_VFE;
 
 	if (common_data->event_cb)
-		common_data->event_cb(NULL, CAM_ISP_HW_EVENT_ERROR,
+		common_data->event_cb(common_data->priv, CAM_ISP_HW_EVENT_ERROR,
 			(void *)&evt_info);
 	return 0;
 }