diff --git a/drivers/cam_cpas/cam_cpas_hw.c b/drivers/cam_cpas/cam_cpas_hw.c index a26e66b622..d9836f45e4 100644 --- a/drivers/cam_cpas/cam_cpas_hw.c +++ b/drivers/cam_cpas/cam_cpas_hw.c @@ -199,6 +199,12 @@ static int cam_cpas_util_vote_drv_bus_client_bw(struct cam_cpas_bus_client *bus_ (curr_vote->drv_vote.high.ib < CAM_CPAS_AXI_MIN_MNOC_IB_BW)) curr_vote->drv_vote.high.ib = CAM_CPAS_AXI_MIN_MNOC_IB_BW; + if (debug_drv) + CAM_INFO(CAM_CPAS, "Bus_client: %s, DRV vote high=[%llu %llu] low=[%llu %llu]", + bus_client->common_data.name, curr_vote->drv_vote.high.ab, + curr_vote->drv_vote.high.ib, curr_vote->drv_vote.low.ab, + curr_vote->drv_vote.low.ib); + CAM_DBG(CAM_CPAS, "Bus_client: %s, DRV vote high=[%llu %llu] low=[%llu %llu]", bus_client->common_data.name, curr_vote->drv_vote.high.ab, curr_vote->drv_vote.high.ib, curr_vote->drv_vote.low.ab, @@ -1419,6 +1425,11 @@ vote_start_clients: goto unlock_tree; } + if (debug_drv) + CAM_INFO(CAM_CPAS, "Started rsc dev %s mnoc port:%s", + dev_name(mnoc_axi_port->cam_rsc_dev), + mnoc_axi_port->axi_port_name); + CAM_DBG(CAM_CPAS, "Started rsc dev %s mnoc port:%s", dev_name(mnoc_axi_port->cam_rsc_dev), mnoc_axi_port->axi_port_name); @@ -1436,6 +1447,11 @@ vote_start_clients: goto unlock_tree; } + if (debug_drv) + CAM_INFO(CAM_CPAS, "Stopped rsc dev %s mnoc port:%s", + dev_name(mnoc_axi_port->cam_rsc_dev), + mnoc_axi_port->axi_port_name); + CAM_DBG(CAM_CPAS, "Stopped rsc dev %s mnoc port:%s", dev_name(mnoc_axi_port->cam_rsc_dev), mnoc_axi_port->axi_port_name); @@ -1451,6 +1467,12 @@ vote_start_clients: goto unlock_tree; } + if (debug_drv) + CAM_INFO(CAM_CPAS, + "Channel switch for rsc dev %s mnoc port:%s", + dev_name(mnoc_axi_port->cam_rsc_dev), + mnoc_axi_port->axi_port_name); + CAM_DBG(CAM_CPAS, "Channel switch for rsc dev %s mnoc port:%s", dev_name(mnoc_axi_port->cam_rsc_dev), @@ -1954,6 +1976,10 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args, if (cpas_core->force_hlos_drv) soc_private->enable_cam_ddr_drv = false; + if (debug_drv) + CAM_INFO(CAM_CPAS, "DDR DRV enable:%s", + CAM_BOOL_TO_YESNO(soc_private->enable_cam_ddr_drv)); + rc = cam_cpas_util_apply_default_axi_vote(cpas_hw, true); if (rc) goto remove_ahb_vote; diff --git a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c index 944fe106ed..3577c8a282 100644 --- a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +++ b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c @@ -143,6 +143,14 @@ static int cam_isp_blob_drv_config(struct cam_ife_hw_mgr_ctx *ctx, ife_hw_mgr = ctx->hw_mgr; drv_config = &prepare_hw_data->isp_drv_config; + if (debug_drv) + CAM_INFO(CAM_PERF, + "DRV config blob opcode:%u req_id:%llu disable_drv_override:%s ctx_idx:%u drv_en:%s path_idle_en:0x%x timeout_val:%u", + prepare_hw_data->packet_opcode_type, request_id, + CAM_BOOL_TO_YESNO(g_ife_hw_mgr.debug_cfg.disable_isp_drv), + ctx->ctx_index, CAM_BOOL_TO_YESNO(drv_config->drv_en), + drv_config->path_idle_en, drv_config->timeout_val); + CAM_DBG(CAM_PERF, "DRV config blob opcode:%u req_id:%llu disable_drv_override:%s ctx_idx:%u drv_en:%u path_idle_en:0x%x timeout_val:%u", prepare_hw_data->packet_opcode_type, request_id, diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c index 9a24b0013e..bbdd426403 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c @@ -5634,6 +5634,13 @@ static int cam_ife_csid_ver2_drv_config( cam_io_w_mb(drv_config->timeout_val, mem_base + csid_reg->cmn_reg->drv_cfg2_addr); + if (debug_drv) + CAM_INFO(CAM_ISP, + "CSID[%u] sfe_en:%s DRV config init_req:%s cfg0_val:0x%x cfg1_val:0x%x cfg2_val:0x%x", + csid_hw->hw_intf->hw_idx, CAM_BOOL_TO_YESNO(csid_hw->flags.sfe_en), + CAM_BOOL_TO_YESNO(drv_config->is_init_config), cfg0_val, cfg1_val, + drv_config->timeout_val); + CAM_DBG(CAM_ISP, "CSID[%u] sfe_en:%s DRV config init_req:%s cfg0_val:0x%x cfg1_val:0x%x cfg2_val:0x%x", csid_hw->hw_intf->hw_idx, CAM_BOOL_TO_YESNO(csid_hw->flags.sfe_en), diff --git a/drivers/cam_utils/cam_debug_util.c b/drivers/cam_utils/cam_debug_util.c index dba75c587c..81dcf2439d 100644 --- a/drivers/cam_utils/cam_debug_util.c +++ b/drivers/cam_utils/cam_debug_util.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -21,6 +22,9 @@ module_param(debug_type, uint, 0644); uint debug_priority; module_param(debug_priority, uint, 0644); +uint debug_drv; +module_param(debug_drv, uint, 0644); + struct camera_debug_settings cam_debug; struct dentry *cam_debugfs_root; diff --git a/drivers/cam_utils/cam_debug_util.h b/drivers/cam_utils/cam_debug_util.h index d3436652af..478876b8cd 100644 --- a/drivers/cam_utils/cam_debug_util.h +++ b/drivers/cam_utils/cam_debug_util.h @@ -14,6 +14,7 @@ extern unsigned long long debug_mdl; extern unsigned int debug_type; extern unsigned int debug_priority; +extern unsigned int debug_drv; #define CAM_IS_NULL_TO_STR(ptr) ((ptr) ? "Non-NULL" : "NULL")