mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
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: 2594541 Change-Id: I2771d3c663c0fcb58306952f161c11a473846f8d Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
This commit is contained in:
parent
d07eb2f941
commit
50fd3a70d1
3 changed files with 20 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
cam_io_w_mb(0x2581F4,
|
||||
/*
|
||||
* 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);
|
||||
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);
|
||||
|
||||
/* 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);
|
||||
|
||||
/* Set the TOP tpg mux sel*/
|
||||
cam_io_w_mb((1 << tpg_hw->hw_intf->hw_idx),
|
||||
|
|
|
|||
Loading…
Reference in a new issue