Browse Source

msm: camera: tfe: correct wm configuration for LCR PD port

LCR PD port is configured wrongly to line based mode instead
of frame based mode. Correct the configuration for LCR PD port
to set right mode.

CRs-Fixed: 3478317
Change-Id: I336782ccd4aaca48fafd173e71819c159d1bf509
Signed-off-by: Alok Chauhan <[email protected]>
Alok Chauhan 2 năm trước cách đây
mục cha
commit
21fd48f502

+ 1 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe530.h

@@ -876,7 +876,7 @@ static struct cam_tfe_bus_hw_info  tfe530_bus_hw_info = {
 	.max_bw_counter_limit  = 0xFF,
 	.counter_limit_shift   = 1,
 	.counter_limit_mask    = 0xF,
-	.en_cfg_shift = 16,
+	.mode_cfg_shift = 16,
 	.height_shift = 16,
 };
 

+ 1 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe640.h

@@ -1192,7 +1192,7 @@ static struct cam_tfe_bus_hw_info  tfe640_bus_hw_info = {
 	.max_bw_counter_limit  = 0xFF,
 	.counter_limit_shift   = 1,
 	.counter_limit_mask    = 0xF,
-	.en_cfg_shift = 16,
+	.mode_cfg_shift = 16,
 	.height_shift = 16,
 };
 

+ 1 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe770.h

@@ -1378,7 +1378,7 @@ static struct cam_tfe_bus_hw_info  tfe770_bus_hw_info = {
 	.support_consumed_addr = true,
 	.pdaf_rdi2_mux_en = false,
 	.rdi_width = 128,
-	.en_cfg_shift = 16,
+	.mode_cfg_shift = 16,
 	.height_shift = 16,
 };
 

+ 12 - 12
drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.c

@@ -71,7 +71,7 @@ struct cam_tfe_bus_common_data {
 	uint32_t                                    num_sec_out;
 	uint32_t                                    comp_done_shift;
 	uint32_t                                    rdi_width;
-	uint32_t                                    en_cfg_shift;
+	uint32_t                                    mode_cfg_shift;
 	uint32_t                                    height_shift;
 	bool                                        is_lite;
 	bool                                        support_consumed_addr;
@@ -652,7 +652,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 {
 	int pack_fmt = 0;
 	int rdi_width = rsrc_data->common_data->rdi_width;
-	int en_cfg_shift = rsrc_data->common_data->en_cfg_shift;
+	int mode_cfg_shift = rsrc_data->common_data->mode_cfg_shift;
 	if (rdi_width == 64)
 		pack_fmt = 0xa;
 	else if (rdi_width == 128)
@@ -672,7 +672,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 			rsrc_data->height = 0;
 			rsrc_data->stride =
 				CAM_TFE_RDI_BUS_DEFAULT_STRIDE;
-			rsrc_data->en_cfg = (0x1 << en_cfg_shift) | 0x1;
+			rsrc_data->en_cfg = (0x1 << mode_cfg_shift) | 0x1;
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_8:
@@ -689,7 +689,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 			rsrc_data->height = 0;
 			rsrc_data->stride =
 				CAM_TFE_RDI_BUS_DEFAULT_STRIDE;
-			rsrc_data->en_cfg = (0x1 << en_cfg_shift) | 0x1;
+			rsrc_data->en_cfg = (0x1 << mode_cfg_shift) | 0x1;
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_10:
@@ -705,7 +705,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 			rsrc_data->height = 0;
 			rsrc_data->stride =
 				CAM_TFE_RDI_BUS_DEFAULT_STRIDE;
-			rsrc_data->en_cfg = (0x1 << en_cfg_shift) | 0x1;
+			rsrc_data->en_cfg = (0x1 << mode_cfg_shift) | 0x1;
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_12:
@@ -721,7 +721,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 			rsrc_data->height = 0;
 			rsrc_data->stride =
 				CAM_TFE_RDI_BUS_DEFAULT_STRIDE;
-			rsrc_data->en_cfg = (0x1 << en_cfg_shift) | 0x1;
+			rsrc_data->en_cfg = (0x1 << mode_cfg_shift) | 0x1;
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_14:
@@ -737,7 +737,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 			rsrc_data->height = 0;
 			rsrc_data->stride =
 				CAM_TFE_RDI_BUS_DEFAULT_STRIDE;
-			rsrc_data->en_cfg = (0x1 << en_cfg_shift) | 0x1;
+			rsrc_data->en_cfg = (0x1 << mode_cfg_shift) | 0x1;
 		}
 		break;
 	case CAM_FORMAT_PLAIN16_10:
@@ -757,7 +757,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 			rsrc_data->height = 0;
 			rsrc_data->stride =
 				CAM_TFE_RDI_BUS_DEFAULT_STRIDE;
-			rsrc_data->en_cfg = (0x1 << en_cfg_shift) | 0x1;
+			rsrc_data->en_cfg = (0x1 << mode_cfg_shift) | 0x1;
 		}
 		break;
 
@@ -775,7 +775,7 @@ static int cam_tfe_bus_acquire_rdi_wm(
 			rsrc_data->height = 0;
 			rsrc_data->stride =
 				CAM_TFE_RDI_BUS_DEFAULT_STRIDE;
-			rsrc_data->en_cfg = (0x1 << en_cfg_shift) | 0x1;
+			rsrc_data->en_cfg = (0x1 << mode_cfg_shift) | 0x1;
 		}
 		break;
 	default:
@@ -911,7 +911,7 @@ static int cam_tfe_bus_acquire_wm(
 		rsrc_data->width = 0;
 		rsrc_data->height = 0;
 		rsrc_data->stride = 1;
-		rsrc_data->en_cfg = (0x1 << rsrc_data->common_data->en_cfg_shift) | 0x1;
+		rsrc_data->en_cfg = (0x1 << rsrc_data->common_data->mode_cfg_shift) | 0x1;
 
 		/*RS state packet format*/
 		if (rsrc_data->index == 15)
@@ -923,7 +923,7 @@ static int cam_tfe_bus_acquire_wm(
 			rsrc_data->width = 0;
 			rsrc_data->height = 0;
 			rsrc_data->stride = 1;
-			rsrc_data->en_cfg = 0x1;
+			rsrc_data->en_cfg = (0x1 << rsrc_data->common_data->mode_cfg_shift) | 0x1;
 			break;
 		default:
 			CAM_ERR(CAM_ISP, "Invalid format %d out_type:%d index: %d",
@@ -2823,7 +2823,7 @@ int cam_tfe_bus_init(
 	bus_priv->common_data.max_bw_counter_limit = hw_info->max_bw_counter_limit;
 	bus_priv->common_data.counter_limit_shift = hw_info->counter_limit_shift;
 	bus_priv->common_data.counter_limit_mask = hw_info->counter_limit_mask;
-	bus_priv->common_data.en_cfg_shift = hw_info->en_cfg_shift;
+	bus_priv->common_data.mode_cfg_shift = hw_info->mode_cfg_shift;
 	bus_priv->common_data.height_shift = hw_info->height_shift;
 	bus_priv->common_data.pack_align_shift = hw_info->pack_align_shift;
 

+ 3 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.h

@@ -195,6 +195,8 @@ struct cam_tfe_bus_tfe_out_hw_info {
  * @num_comp_grp:          Number of composite group
  * @max_wm_per_comp_grp:   Max number of wm associated with one composite group
  * @comp_done_shift:       Mask shift for comp done mask
+ * @mode_cfg_shift:        Mask shift for mode config
+ * @height_shift:          Mask shift for height shift
  * @top_bus_wr_irq_shift:  Mask shift for top level BUS WR irq
  * @comp_buf_done_mask:    Composite buf done bits mask
  * @comp_rup_done_mask:    Reg update done mask
@@ -219,7 +221,7 @@ struct cam_tfe_bus_hw_info {
 	uint32_t num_comp_grp;
 	uint32_t max_wm_per_comp_grp;
 	uint32_t comp_done_shift;
-	uint32_t en_cfg_shift;
+	uint32_t mode_cfg_shift;
 	uint32_t height_shift;
 	uint32_t top_bus_wr_irq_shift;
 	uint32_t comp_buf_done_mask;