Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3feca853 authored by Ravikishore Pampana's avatar Ravikishore Pampana
Browse files

msm: camera: tfe: Configure TPG hbi and vbi



User space will send HBI and VBI values for tpg. Configure the TPG
HBI and VBI values based on the user space given values.
If user space does not send then configure the default values.
Assign the isp context variable in the hw update data during the
tfe hw config.  Update proper comp group id for slave tfe.

CRs-Fixed: 2545590
Change-Id: I2771d3c663c0fcb58306952f161c11a473846f8d
Signed-off-by: default avatarRavikishore Pampana <rpampana@codeaurora.org>
parent f3021629
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2348,6 +2348,7 @@ static int cam_tfe_mgr_config_hw(void *hw_mgr_priv,
		return -EINVAL;

	hw_update_data = (struct cam_isp_prepare_hw_update_data  *) cfg->priv;
	hw_update_data->isp_mgr_ctx = ctx;

	for (i = 0; i < CAM_TFE_HW_NUM_MAX; i++) {
		if (hw_update_data->bw_config_valid[i] == true) {
+1 −0
Original line number Diff line number Diff line
@@ -933,6 +933,7 @@ static int cam_tfe_bus_start_comp_grp(
			val = cam_io_r(common_data->mem_base +
				common_data->common_reg->comp_cfg_0);
			val |= (0x1 << rsrc_data->comp_grp_id);
			val |= (0x1 << (rsrc_data->comp_grp_id + 16));
			cam_io_w(val, common_data->mem_base +
				common_data->common_reg->comp_cfg_0);

+18 −6
Original line number Diff line number Diff line
@@ -444,17 +444,29 @@ static int cam_top_tpg_start(void *hw_priv, void *start_args,
		 tpg_reg->tpg_num_dts_shift_val) | tpg_data->vc_num;
	cam_io_w_mb(val, soc_info->reg_map[0].mem_base + tpg_reg->tpg_vc_cfg0);

	/* HBlank count 500 and V blank count is 600 */
	/*
	 * if hblank is notset configureHBlank count 500 and
	 * V blank count is 600
	 */

	if (tpg_data->h_blank_count)
		cam_io_w_mb(tpg_data->h_blank_count,
			soc_info->reg_map[0].mem_base + tpg_reg->tpg_vc_cfg1);
	else
		cam_io_w_mb(0x2581F4,
		soc_info->reg_map[0].mem_base + tpg_reg->tpg_vc_cfg1);

	val = (1 << tpg_reg->tpg_split_en_shift);
	cam_io_w_mb(tpg_data->pix_pattern, soc_info->reg_map[0].mem_base +
		tpg_reg->tpg_common_gen_cfg);

	/* if VBI is notset configureVBI to 0xAFF */
	if (tpg_data->v_blank_count)
		cam_io_w_mb(tpg_data->v_blank_count,
			soc_info->reg_map[0].mem_base + tpg_reg->tpg_vbi_cfg);
	else
		cam_io_w_mb(0xAFFF,
			soc_info->reg_map[0].mem_base + tpg_reg->tpg_vbi_cfg);
	CAM_DBG(CAM_ISP, "TPG:%d set TPG VBI to  0xAFFF",
		tpg_hw->hw_intf->hw_idx);

	/* Set the TOP tpg mux sel*/
	cam_io_w_mb((1 << tpg_hw->hw_intf->hw_idx),