From 661a4191316057b23029f97c6ea8480d157d46b3 Mon Sep 17 00:00:00 2001 From: Ayush Kumar Date: Mon, 15 Mar 2021 15:46:44 +0530 Subject: [PATCH] msm: camera: isp: Add horizontal binning with qcfa binning This change is to add horizontal and vertical binning if qcfa binning is enabled. In qcfa binning, horizontal and vertical binning should be enable along with qcfa binning, whereas for only horizontal and vertical binning is required for bayer binning. CRs-Fixed: 2890967 Change-Id: I096d170cfb7a4a725deaffe5dc3996b23070040f Signed-off-by: Ayush Kumar --- .../isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid175_200.h | 3 ++- .../cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid175_200.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid175_200.h index 1794a860b84e..e22cc1404c43 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid175_200.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid175_200.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_IFE_CSID_175_200_H_ @@ -47,6 +47,7 @@ static struct cam_ife_csid_pxl_reg_offset /* configurations */ .pix_store_en_shift_val = 7, .early_eof_en_shift_val = 29, + .horizontal_bin_en_shift_val = 2, .quad_cfa_bin_en_shift_val = 30, .ccif_violation_en = 1, }; diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c index 1ba93e2425fc..91c9cabf0af4 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c @@ -2055,8 +2055,10 @@ static int cam_ife_csid_init_config_pxl_path( } if (is_ipp && csid_hw->binning_supported && - csid_hw->binning_enable) + csid_hw->binning_enable) { val |= (1 << pxl_reg->quad_cfa_bin_en_shift_val); + val |= (1 << pxl_reg->horizontal_bin_en_shift_val); + } val |= (1 << pxl_reg->pix_store_en_shift_val); cam_io_w_mb(val, soc_info->reg_map[0].mem_base +