|
@@ -8,6 +8,8 @@
|
|
#include <uapi/media/cam_isp.h>
|
|
#include <uapi/media/cam_isp.h>
|
|
#include <uapi/media/cam_defs.h>
|
|
#include <uapi/media/cam_defs.h>
|
|
|
|
|
|
|
|
+#include <dt-bindings/msm/msm-camera.h>
|
|
|
|
+
|
|
#include "cam_ife_csid_core.h"
|
|
#include "cam_ife_csid_core.h"
|
|
#include "cam_isp_hw.h"
|
|
#include "cam_isp_hw.h"
|
|
#include "cam_soc_util.h"
|
|
#include "cam_soc_util.h"
|
|
@@ -1611,6 +1613,10 @@ static int cam_ife_csid_init_config_pxl_path(
|
|
val |= (1 << pxl_reg->quad_cfa_bin_en_shift_val);
|
|
val |= (1 << pxl_reg->quad_cfa_bin_en_shift_val);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (is_ipp && csid_hw->binning_supported &&
|
|
|
|
+ csid_hw->binning_enable)
|
|
|
|
+ val |= (1 << pxl_reg->quad_cfa_bin_en_shift_val);
|
|
|
|
+
|
|
val |= (1 << pxl_reg->pix_store_en_shift_val);
|
|
val |= (1 << pxl_reg->pix_store_en_shift_val);
|
|
cam_io_w_mb(val, soc_info->reg_map[0].mem_base +
|
|
cam_io_w_mb(val, soc_info->reg_map[0].mem_base +
|
|
pxl_reg->csid_pxl_cfg0_addr);
|
|
pxl_reg->csid_pxl_cfg0_addr);
|
|
@@ -3124,6 +3130,23 @@ static int cam_ife_csid_set_csid_clock(
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int cam_ife_csid_set_csid_qcfa(
|
|
|
|
+ struct cam_ife_csid_hw *csid_hw, void *cmd_args)
|
|
|
|
+{
|
|
|
|
+ struct cam_ife_csid_qcfa_update_args *qcfa_update = NULL;
|
|
|
|
+
|
|
|
|
+ if (!csid_hw)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
|
|
+ qcfa_update =
|
|
|
|
+ (struct cam_ife_csid_qcfa_update_args *)cmd_args;
|
|
|
|
+
|
|
|
|
+ csid_hw->binning_supported = qcfa_update->qcfa_binning;
|
|
|
|
+ CAM_DBG(CAM_ISP, "CSID QCFA binning %d", csid_hw->binning_supported);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static int cam_ife_csid_process_cmd(void *hw_priv,
|
|
static int cam_ife_csid_process_cmd(void *hw_priv,
|
|
uint32_t cmd_type, void *cmd_args, uint32_t arg_size)
|
|
uint32_t cmd_type, void *cmd_args, uint32_t arg_size)
|
|
{
|
|
{
|
|
@@ -3158,6 +3181,9 @@ static int cam_ife_csid_process_cmd(void *hw_priv,
|
|
case CAM_ISP_HW_CMD_CSID_CLOCK_UPDATE:
|
|
case CAM_ISP_HW_CMD_CSID_CLOCK_UPDATE:
|
|
rc = cam_ife_csid_set_csid_clock(csid_hw, cmd_args);
|
|
rc = cam_ife_csid_set_csid_clock(csid_hw, cmd_args);
|
|
break;
|
|
break;
|
|
|
|
+ case CAM_ISP_HW_CMD_CSID_QCFA_SUPPORTED:
|
|
|
|
+ rc = cam_ife_csid_set_csid_qcfa(csid_hw, cmd_args);
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
CAM_ERR(CAM_ISP, "CSID:%d unsupported cmd:%d",
|
|
CAM_ERR(CAM_ISP, "CSID:%d unsupported cmd:%d",
|
|
csid_hw->hw_intf->hw_idx, cmd_type);
|
|
csid_hw->hw_intf->hw_idx, cmd_type);
|
|
@@ -3601,6 +3627,9 @@ int cam_ife_csid_hw_probe_init(struct cam_hw_intf *csid_hw_intf,
|
|
goto err;
|
|
goto err;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (cam_cpas_is_feature_supported(CAM_CPAS_QCFA_BINNING_ENABLE) == 1)
|
|
|
|
+ ife_csid_hw->binning_enable = 1;
|
|
|
|
+
|
|
ife_csid_hw->hw_intf->hw_ops.get_hw_caps = cam_ife_csid_get_hw_caps;
|
|
ife_csid_hw->hw_intf->hw_ops.get_hw_caps = cam_ife_csid_get_hw_caps;
|
|
ife_csid_hw->hw_intf->hw_ops.init = cam_ife_csid_init_hw;
|
|
ife_csid_hw->hw_intf->hw_ops.init = cam_ife_csid_init_hw;
|
|
ife_csid_hw->hw_intf->hw_ops.deinit = cam_ife_csid_deinit_hw;
|
|
ife_csid_hw->hw_intf->hw_ops.deinit = cam_ife_csid_deinit_hw;
|