From 329870a0135926e3c6864344a0aac81c12c89396 Mon Sep 17 00:00:00 2001 From: Trishansh Bhardwaj Date: Fri, 7 Aug 2020 18:03:22 +0530 Subject: [PATCH] msm: camera: tfe: confine hw errata for bengal Confine bengal specific HW errata CRs-Fixed: 2752895 Change-Id: I896b1f2e16adf917085e7056f08e87b212485dbb Signed-off-by: Trishansh Bhardwaj --- .../isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_core.c | 20 ++++++++++++------- .../cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_core.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_core.c index 36a87fe3101b..f4b7d669e800 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_core.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_core.c @@ -1901,6 +1901,7 @@ static int cam_tfe_camif_resource_start( uint32_t epoch0_irq_mask; uint32_t epoch1_irq_mask; uint32_t computed_epoch_line_cfg; + uint32_t camera_hw_version = 0; if (!camif_res || !core_info) { CAM_ERR(CAM_ISP, "Error Invalid input arguments"); @@ -1963,13 +1964,18 @@ static int cam_tfe_camif_resource_start( CAM_DBG(CAM_ISP, "TFE:%d core_cfg 0 val:0x%x", core_info->core_index, val); - val = cam_io_r(rsrc_data->mem_base + - rsrc_data->common_reg->core_cfg_1); - val &= ~BIT(0); - cam_io_w_mb(val, rsrc_data->mem_base + - rsrc_data->common_reg->core_cfg_1); - CAM_DBG(CAM_ISP, "TFE:%d core_cfg 1 val:0x%x", core_info->core_index, - val); + if (cam_cpas_get_cpas_hw_version(&camera_hw_version)) + CAM_ERR(CAM_ISP, "Failed to get HW version"); + + if (camera_hw_version == CAM_CPAS_TITAN_540_V100) { + val = cam_io_r(rsrc_data->mem_base + + rsrc_data->common_reg->core_cfg_1); + val &= ~BIT(0); + cam_io_w_mb(val, rsrc_data->mem_base + + rsrc_data->common_reg->core_cfg_1); + CAM_DBG(CAM_ISP, "TFE:%d core_cfg 1 val:0x%x", + core_info->core_index, val); + } /* Epoch config */ epoch0_irq_mask = ((rsrc_data->last_line - diff --git a/drivers/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c b/drivers/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c index 121339e28161..df5b61eb916d 100644 --- a/drivers/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c +++ b/drivers/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c @@ -1022,7 +1022,7 @@ static int cam_lrme_mgr_create_debugfs_entry(void) if (!dbgfileptr) { CAM_ERR(CAM_ISP,"DebugFS could not create directory!"); rc = -ENOENT; - goto end; + goto err; } /* Store parent inode for cleanup in caller */ g_lrme_hw_mgr.debugfs_entry.dentry = dbgfileptr;