int msm_isp_cfg_pix(struct vfe_device *vfe_dev, struct msm_vfe_input_cfg *input_cfg) { int rc = 0; if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { pr_err("%s: pixel path is active\n", __func__); return -EINVAL; } vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock = input_cfg->input_pix_clk; vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux = input_cfg->d.pix_cfg.input_mux; vfe_dev->axi_data.src_info[VFE_PIX_0].width = input_cfg->d.pix_cfg.camif_cfg.pixels_per_line; rc = msm_isp_set_clk_rate(vfe_dev, &vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock); if (rc < 0) { pr_err("%s: clock set rate failed\n", __func__); return rc; } vfe_dev->axi_data.src_info[VFE_PIX_0].input_format = input_cfg->d.pix_cfg.input_format; vfe_dev->hw_info->vfe_ops.core_ops.cfg_camif( vfe_dev, &input_cfg->d.pix_cfg); return rc; }
int msm_isp_cfg_rdi(struct vfe_device *vfe_dev, struct msm_vfe_input_cfg *input_cfg) { int rc = 0; if (vfe_dev->axi_data.src_info[input_cfg->input_src].active) { pr_err("%s: RAW%d path is active\n", __func__, input_cfg->input_src - VFE_RAW_0); return -EINVAL; } vfe_dev->axi_data.src_info[input_cfg->input_src].pixel_clock = input_cfg->input_pix_clk; vfe_dev->hw_info->vfe_ops.core_ops.cfg_rdi_reg( vfe_dev, &input_cfg->d.rdi_cfg, input_cfg->input_src); rc = msm_isp_set_clk_rate(vfe_dev, &vfe_dev->axi_data.src_info[input_cfg->input_src].pixel_clock); if (rc < 0) { pr_err("%s: clock set rate failed\n", __func__); return rc; } return rc; }