|
@@ -2982,32 +2982,6 @@ static int cam_ife_mgr_acquire_get_unified_structure(
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static bool cam_ife_mgr_is_consumed_addr_supported(
|
|
|
- struct cam_ife_hw_mgr_ctx *ctx)
|
|
|
-{
|
|
|
- bool support_consumed_addr = false;
|
|
|
- struct cam_isp_hw_mgr_res *isp_hw_res = NULL;
|
|
|
- struct cam_hw_intf *hw_intf = NULL;
|
|
|
-
|
|
|
- isp_hw_res = &ctx->res_list_ife_out[0];
|
|
|
-
|
|
|
- if (!isp_hw_res || !isp_hw_res->hw_res[0]) {
|
|
|
- CAM_ERR(CAM_ISP, "Invalid ife out res.");
|
|
|
- goto end;
|
|
|
- }
|
|
|
-
|
|
|
- hw_intf = isp_hw_res->hw_res[0]->hw_intf;
|
|
|
- if (hw_intf && hw_intf->hw_ops.process_cmd) {
|
|
|
- hw_intf->hw_ops.process_cmd(hw_intf->hw_priv,
|
|
|
- CAM_ISP_HW_CMD_IS_CONSUMED_ADDR_SUPPORT,
|
|
|
- &support_consumed_addr,
|
|
|
- sizeof(support_consumed_addr));
|
|
|
- }
|
|
|
-
|
|
|
-end:
|
|
|
- return support_consumed_addr;
|
|
|
-}
|
|
|
-
|
|
|
/* entry function: acquire_hw */
|
|
|
static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
|
|
|
{
|
|
@@ -3171,7 +3145,7 @@ static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
|
|
|
atomic_set(&ife_ctx->cdm_done, 1);
|
|
|
|
|
|
acquire_args->support_consumed_addr =
|
|
|
- cam_ife_mgr_is_consumed_addr_supported(ife_ctx);
|
|
|
+ g_ife_hw_mgr.support_consumed_addr;
|
|
|
|
|
|
acquire_args->ctxt_to_hw_map = ife_ctx;
|
|
|
acquire_args->custom_enabled = ife_ctx->custom_enabled;
|
|
@@ -7677,6 +7651,7 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
|
|
|
{
|
|
|
int rc = -EFAULT;
|
|
|
int i, j;
|
|
|
+ bool support_consumed_addr = false;
|
|
|
struct cam_iommu_handle cdm_handles;
|
|
|
struct cam_ife_hw_mgr_ctx *ctx_pool;
|
|
|
struct cam_isp_hw_mgr_res *res_list_ife_out;
|
|
@@ -7695,11 +7670,19 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
|
|
|
for (i = 0, j = 0; i < CAM_IFE_HW_NUM_MAX; i++) {
|
|
|
rc = cam_vfe_hw_init(&g_ife_hw_mgr.ife_devices[i], i);
|
|
|
if (!rc) {
|
|
|
+ struct cam_hw_intf *ife_device =
|
|
|
+ g_ife_hw_mgr.ife_devices[i];
|
|
|
struct cam_hw_info *vfe_hw =
|
|
|
(struct cam_hw_info *)
|
|
|
- g_ife_hw_mgr.ife_devices[i]->hw_priv;
|
|
|
+ ife_device->hw_priv;
|
|
|
struct cam_hw_soc_info *soc_info = &vfe_hw->soc_info;
|
|
|
|
|
|
+ if (j == 0)
|
|
|
+ ife_device->hw_ops.process_cmd(
|
|
|
+ vfe_hw,
|
|
|
+ CAM_ISP_HW_CMD_IS_CONSUMED_ADDR_SUPPORT,
|
|
|
+ &support_consumed_addr,
|
|
|
+ sizeof(support_consumed_addr));
|
|
|
j++;
|
|
|
|
|
|
g_ife_hw_mgr.cdm_reg_map[i] = &soc_info->reg_map[0];
|
|
@@ -7716,6 +7699,8 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
+ g_ife_hw_mgr.support_consumed_addr = support_consumed_addr;
|
|
|
+
|
|
|
/* fill csid hw intf information */
|
|
|
for (i = 0, j = 0; i < CAM_IFE_CSID_HW_NUM_MAX; i++) {
|
|
|
rc = cam_ife_csid_hw_init(&g_ife_hw_mgr.csid_devices[i], i);
|