Loading drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +16 −1 Original line number Diff line number Diff line Loading @@ -3252,6 +3252,17 @@ static int cam_tfe_mgr_start_hw(void *hw_mgr_priv, void *start_hw_args) if (ctx->init_done && start_isp->start_only) goto start_only; /* set tpg debug information for top tpg */ for (i = 0; i < CAM_TOP_TPG_HW_NUM_MAX; i++) { if (g_tfe_hw_mgr.tpg_devices[i]) { rc = g_tfe_hw_mgr.tpg_devices[i]->hw_ops.process_cmd( g_tfe_hw_mgr.tpg_devices[i]->hw_priv, CAM_ISP_HW_CMD_TPG_SET_PATTERN, &g_tfe_hw_mgr.debug_cfg.set_tpg_pattern, sizeof(g_tfe_hw_mgr.debug_cfg.set_tpg_pattern)); } } list_for_each_entry(hw_mgr_res, &ctx->res_list_tfe_csid, list) { for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) { if (!hw_mgr_res->hw_res[i]) Loading Loading @@ -5813,6 +5824,7 @@ static int cam_tfe_hw_mgr_debug_register(void) int rc = 0; struct dentry *dbgfileptr = NULL; g_tfe_hw_mgr.debug_cfg.set_tpg_pattern = CAM_TOP_TPG_DEFAULT_PATTERN; dbgfileptr = debugfs_create_dir("camera_tfe", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ISP, "DebugFS could not create directory!"); Loading @@ -5833,6 +5845,9 @@ static int cam_tfe_hw_mgr_debug_register(void) dbgfileptr = debugfs_create_u32("enable_csid_recovery", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.enable_csid_recovery); dbgfileptr = debugfs_create_u32("set_tpg_pattern", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.set_tpg_pattern); dbgfileptr = debugfs_create_file("tfe_camif_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_camif_debug); dbgfileptr = debugfs_create_u32("per_req_reg_dump", 0644, Loading drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.h +3 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_TFE_HW_MGR_H_ Loading Loading @@ -30,6 +30,7 @@ * @enable_recovery: enable recovery * @enable_csid_recovery: enable csid recovery * @camif_debug: enable sensor diagnosis status * @set_tpg_pattern: tpg pattern information * @enable_reg_dump: enable reg dump on error; * @per_req_reg_dump: Enable per request reg dump * Loading @@ -40,6 +41,7 @@ struct cam_tfe_hw_mgr_debug { uint32_t enable_recovery; uint32_t enable_csid_recovery; uint32_t camif_debug; uint32_t set_tpg_pattern; uint32_t enable_reg_dump; uint32_t per_req_reg_dump; }; Loading drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_isp_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ enum cam_isp_hw_cmd_type { CAM_ISP_HW_CMD_GET_CLOCK_RATE, CAM_ISP_HW_CMD_DYNAMIC_CLOCK_UPDATE, CAM_ISP_HW_DUMP_HW_SRC_CLK_RATE, CAM_ISP_HW_CMD_TPG_SET_PATTERN, CAM_ISP_HW_CMD_MAX, }; Loading drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_top_tpg_hw_intf.h +3 −2 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_TOP_TPG_HW_INTF_H_ Loading @@ -14,7 +14,8 @@ #define CAM_TOP_TPG_HW_NUM_MAX 3 /* Max supported number of DT for TPG */ #define CAM_TOP_TPG_MAX_SUPPORTED_DT 4 /* TPG default pattern should be color bar */ #define CAM_TOP_TPG_DEFAULT_PATTERN 0x8 /** * enum cam_top_tpg_id - top tpg hw instance id */ Loading drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg101.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_TOP_TPG101_H_ Loading Loading @@ -49,6 +49,7 @@ static struct cam_top_tpg_ver1_reg_offset cam_top_tpg101_reg = { .tpg_payload_mode_color = 0x8, .tpg_split_en_shift = 5, .top_mux_reg_offset = 0x1C, .top_unicolor_bar_shift = 2, }; struct cam_top_tpg_hw_info cam_top_tpg101_hw_info = { Loading Loading
drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +16 −1 Original line number Diff line number Diff line Loading @@ -3252,6 +3252,17 @@ static int cam_tfe_mgr_start_hw(void *hw_mgr_priv, void *start_hw_args) if (ctx->init_done && start_isp->start_only) goto start_only; /* set tpg debug information for top tpg */ for (i = 0; i < CAM_TOP_TPG_HW_NUM_MAX; i++) { if (g_tfe_hw_mgr.tpg_devices[i]) { rc = g_tfe_hw_mgr.tpg_devices[i]->hw_ops.process_cmd( g_tfe_hw_mgr.tpg_devices[i]->hw_priv, CAM_ISP_HW_CMD_TPG_SET_PATTERN, &g_tfe_hw_mgr.debug_cfg.set_tpg_pattern, sizeof(g_tfe_hw_mgr.debug_cfg.set_tpg_pattern)); } } list_for_each_entry(hw_mgr_res, &ctx->res_list_tfe_csid, list) { for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) { if (!hw_mgr_res->hw_res[i]) Loading Loading @@ -5813,6 +5824,7 @@ static int cam_tfe_hw_mgr_debug_register(void) int rc = 0; struct dentry *dbgfileptr = NULL; g_tfe_hw_mgr.debug_cfg.set_tpg_pattern = CAM_TOP_TPG_DEFAULT_PATTERN; dbgfileptr = debugfs_create_dir("camera_tfe", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ISP, "DebugFS could not create directory!"); Loading @@ -5833,6 +5845,9 @@ static int cam_tfe_hw_mgr_debug_register(void) dbgfileptr = debugfs_create_u32("enable_csid_recovery", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.enable_csid_recovery); dbgfileptr = debugfs_create_u32("set_tpg_pattern", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.set_tpg_pattern); dbgfileptr = debugfs_create_file("tfe_camif_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_camif_debug); dbgfileptr = debugfs_create_u32("per_req_reg_dump", 0644, Loading
drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.h +3 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_TFE_HW_MGR_H_ Loading Loading @@ -30,6 +30,7 @@ * @enable_recovery: enable recovery * @enable_csid_recovery: enable csid recovery * @camif_debug: enable sensor diagnosis status * @set_tpg_pattern: tpg pattern information * @enable_reg_dump: enable reg dump on error; * @per_req_reg_dump: Enable per request reg dump * Loading @@ -40,6 +41,7 @@ struct cam_tfe_hw_mgr_debug { uint32_t enable_recovery; uint32_t enable_csid_recovery; uint32_t camif_debug; uint32_t set_tpg_pattern; uint32_t enable_reg_dump; uint32_t per_req_reg_dump; }; Loading
drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_isp_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ enum cam_isp_hw_cmd_type { CAM_ISP_HW_CMD_GET_CLOCK_RATE, CAM_ISP_HW_CMD_DYNAMIC_CLOCK_UPDATE, CAM_ISP_HW_DUMP_HW_SRC_CLK_RATE, CAM_ISP_HW_CMD_TPG_SET_PATTERN, CAM_ISP_HW_CMD_MAX, }; Loading
drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_top_tpg_hw_intf.h +3 −2 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_TOP_TPG_HW_INTF_H_ Loading @@ -14,7 +14,8 @@ #define CAM_TOP_TPG_HW_NUM_MAX 3 /* Max supported number of DT for TPG */ #define CAM_TOP_TPG_MAX_SUPPORTED_DT 4 /* TPG default pattern should be color bar */ #define CAM_TOP_TPG_DEFAULT_PATTERN 0x8 /** * enum cam_top_tpg_id - top tpg hw instance id */ Loading
drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg101.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_TOP_TPG101_H_ Loading Loading @@ -49,6 +49,7 @@ static struct cam_top_tpg_ver1_reg_offset cam_top_tpg101_reg = { .tpg_payload_mode_color = 0x8, .tpg_split_en_shift = 5, .top_mux_reg_offset = 0x1C, .top_unicolor_bar_shift = 2, }; struct cam_top_tpg_hw_info cam_top_tpg101_hw_info = { Loading