Loading drivers/cam_isp/cam_isp_context.c +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "cam_cdm_util.h" #include "cam_isp_context.h" #include "cam_common_util.h" #include "cam_req_mgr_debug.h" static const char isp_dev_name[] = "cam-isp"; Loading Loading @@ -1373,6 +1374,12 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp, CAM_DBG(CAM_ISP, "next Substate[%s]", __cam_isp_ctx_substate_val_to_type( ctx_isp->substate_activated)); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("ISP", "bubble epoch_in_applied", req->request_id, ctx->ctx_id, ctx->link_hdl, ctx->session_hdl, CAM_DEFAULT_VALUE); end: if (request_id == 0) { req = list_last_entry(&ctx->active_req_list, Loading Loading @@ -1567,6 +1574,13 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( CAM_DBG(CAM_ISP, "next Substate[%s]", __cam_isp_ctx_substate_val_to_type( ctx_isp->substate_activated)); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("ISP", "bubble epoch_in_bubble_applied", req->request_id, ctx->ctx_id, ctx->link_hdl, ctx->session_hdl, CAM_DEFAULT_VALUE); end: req = list_last_entry(&ctx->active_req_list, struct cam_ctx_request, list); Loading drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +22 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ #include "cam_cpas_api.h" #include "cam_mem_mgr_api.h" #include "cam_common_util.h" #include "cam_req_mgr_debug.h" #include "cam_trace.h" #define CAM_TFE_HW_ENTRIES_MAX 20 #define CAM_TFE_HW_CONFIG_TIMEOUT 60 Loading Loading @@ -2448,6 +2450,12 @@ static int cam_tfe_mgr_config_hw(void *hw_mgr_priv, "CDM workqueue delay detected, wait for some more time req_id=%llu rc=%d ctx_index %d", cfg->request_id, rc, ctx->ctx_index); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("CDM", "CDM workqueue delay detected", cfg->request_id, ctx->ctx_index, CAM_DEFAULT_VALUE, CAM_DEFAULT_VALUE, rc); continue; } Loading @@ -2455,6 +2463,14 @@ static int cam_tfe_mgr_config_hw(void *hw_mgr_priv, "config done completion timeout for req_id=%llu rc=%d ctx_index %d", cfg->request_id, rc, ctx->ctx_index); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("ISP", "config done completion timeout", cfg->request_id, ctx->ctx_index, CAM_DEFAULT_VALUE, CAM_DEFAULT_VALUE, rc); if (rc == 0) rc = -ETIMEDOUT; Loading Loading @@ -4956,8 +4972,13 @@ static int cam_tfe_hw_mgr_check_irq_for_dual_tfe( tfe_hw_mgr_ctx->dual_tfe_irq_mismatch_cnt++; } if (tfe_hw_mgr_ctx->dual_tfe_irq_mismatch_cnt == 1) if (tfe_hw_mgr_ctx->dual_tfe_irq_mismatch_cnt == 1) { cam_tfe_mgr_ctx_irq_dump(tfe_hw_mgr_ctx); trace_cam_delay_detect("ISP", "dual tfe irq mismatch", CAM_DEFAULT_VALUE, tfe_hw_mgr_ctx->ctx_index, CAM_DEFAULT_VALUE, CAM_DEFAULT_VALUE, rc); } rc = 0; } Loading drivers/cam_req_mgr/cam_req_mgr_core.c +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include "cam_trace.h" #include "cam_debug_util.h" #include "cam_req_mgr_dev.h" #include "cam_req_mgr_debug.h" static struct cam_req_mgr_core_device *g_crm_core_dev; static struct cam_req_mgr_core_link g_links[MAXIMUM_LINKS_PER_SESSION]; Loading Loading @@ -1471,6 +1472,15 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, "Max retry attempts reached on link[0x%x] for req [%lld]", link->link_hdl, in_q->slot[in_q->rd_idx].req_id); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("CRM", "Max retry attempts reached", in_q->slot[in_q->rd_idx].req_id, CAM_DEFAULT_VALUE, link->link_hdl, CAM_DEFAULT_VALUE, rc); __cam_req_mgr_notify_error_on_link(link, dev); link->retry_cnt = 0; } Loading drivers/cam_req_mgr/cam_req_mgr_debug.c +11 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #include "cam_req_mgr_debug.h" Loading @@ -8,6 +8,7 @@ #define MAX_SESS_INFO_LINE_BUFF_LEN 256 static char sess_info_buffer[MAX_SESS_INFO_LINE_BUFF_LEN]; static int cam_debug_mgr_delay_detect; static int cam_req_mgr_debug_set_bubble_recovery(void *data, u64 val) { Loading Loading @@ -128,5 +129,14 @@ int cam_req_mgr_debug_register(struct cam_req_mgr_core_device *core_dev) debugfs_root, core_dev, &bubble_recovery)) return -ENOMEM; if (!debugfs_create_u32("delay_detect_count", 0644, debugfs_root, &cam_debug_mgr_delay_detect)) return -ENOMEM; return 0; } void cam_req_mgr_debug_delay_detect(void) { cam_debug_mgr_delay_detect += 1; } drivers/cam_req_mgr/cam_req_mgr_debug.h +5 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_REQ_MGR_DEBUG_H_ Loading @@ -11,4 +11,8 @@ int cam_req_mgr_debug_register(struct cam_req_mgr_core_device *core_dev); /* cam_req_mgr_debug_delay_detect() * @brief : increment debug_fs varaible by 1 whenever delay occurred. */ void cam_req_mgr_debug_delay_detect(void); #endif Loading
drivers/cam_isp/cam_isp_context.c +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "cam_cdm_util.h" #include "cam_isp_context.h" #include "cam_common_util.h" #include "cam_req_mgr_debug.h" static const char isp_dev_name[] = "cam-isp"; Loading Loading @@ -1373,6 +1374,12 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp, CAM_DBG(CAM_ISP, "next Substate[%s]", __cam_isp_ctx_substate_val_to_type( ctx_isp->substate_activated)); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("ISP", "bubble epoch_in_applied", req->request_id, ctx->ctx_id, ctx->link_hdl, ctx->session_hdl, CAM_DEFAULT_VALUE); end: if (request_id == 0) { req = list_last_entry(&ctx->active_req_list, Loading Loading @@ -1567,6 +1574,13 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( CAM_DBG(CAM_ISP, "next Substate[%s]", __cam_isp_ctx_substate_val_to_type( ctx_isp->substate_activated)); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("ISP", "bubble epoch_in_bubble_applied", req->request_id, ctx->ctx_id, ctx->link_hdl, ctx->session_hdl, CAM_DEFAULT_VALUE); end: req = list_last_entry(&ctx->active_req_list, struct cam_ctx_request, list); Loading
drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +22 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ #include "cam_cpas_api.h" #include "cam_mem_mgr_api.h" #include "cam_common_util.h" #include "cam_req_mgr_debug.h" #include "cam_trace.h" #define CAM_TFE_HW_ENTRIES_MAX 20 #define CAM_TFE_HW_CONFIG_TIMEOUT 60 Loading Loading @@ -2448,6 +2450,12 @@ static int cam_tfe_mgr_config_hw(void *hw_mgr_priv, "CDM workqueue delay detected, wait for some more time req_id=%llu rc=%d ctx_index %d", cfg->request_id, rc, ctx->ctx_index); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("CDM", "CDM workqueue delay detected", cfg->request_id, ctx->ctx_index, CAM_DEFAULT_VALUE, CAM_DEFAULT_VALUE, rc); continue; } Loading @@ -2455,6 +2463,14 @@ static int cam_tfe_mgr_config_hw(void *hw_mgr_priv, "config done completion timeout for req_id=%llu rc=%d ctx_index %d", cfg->request_id, rc, ctx->ctx_index); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("ISP", "config done completion timeout", cfg->request_id, ctx->ctx_index, CAM_DEFAULT_VALUE, CAM_DEFAULT_VALUE, rc); if (rc == 0) rc = -ETIMEDOUT; Loading Loading @@ -4956,8 +4972,13 @@ static int cam_tfe_hw_mgr_check_irq_for_dual_tfe( tfe_hw_mgr_ctx->dual_tfe_irq_mismatch_cnt++; } if (tfe_hw_mgr_ctx->dual_tfe_irq_mismatch_cnt == 1) if (tfe_hw_mgr_ctx->dual_tfe_irq_mismatch_cnt == 1) { cam_tfe_mgr_ctx_irq_dump(tfe_hw_mgr_ctx); trace_cam_delay_detect("ISP", "dual tfe irq mismatch", CAM_DEFAULT_VALUE, tfe_hw_mgr_ctx->ctx_index, CAM_DEFAULT_VALUE, CAM_DEFAULT_VALUE, rc); } rc = 0; } Loading
drivers/cam_req_mgr/cam_req_mgr_core.c +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include "cam_trace.h" #include "cam_debug_util.h" #include "cam_req_mgr_dev.h" #include "cam_req_mgr_debug.h" static struct cam_req_mgr_core_device *g_crm_core_dev; static struct cam_req_mgr_core_link g_links[MAXIMUM_LINKS_PER_SESSION]; Loading Loading @@ -1471,6 +1472,15 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, "Max retry attempts reached on link[0x%x] for req [%lld]", link->link_hdl, in_q->slot[in_q->rd_idx].req_id); cam_req_mgr_debug_delay_detect(); trace_cam_delay_detect("CRM", "Max retry attempts reached", in_q->slot[in_q->rd_idx].req_id, CAM_DEFAULT_VALUE, link->link_hdl, CAM_DEFAULT_VALUE, rc); __cam_req_mgr_notify_error_on_link(link, dev); link->retry_cnt = 0; } Loading
drivers/cam_req_mgr/cam_req_mgr_debug.c +11 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #include "cam_req_mgr_debug.h" Loading @@ -8,6 +8,7 @@ #define MAX_SESS_INFO_LINE_BUFF_LEN 256 static char sess_info_buffer[MAX_SESS_INFO_LINE_BUFF_LEN]; static int cam_debug_mgr_delay_detect; static int cam_req_mgr_debug_set_bubble_recovery(void *data, u64 val) { Loading Loading @@ -128,5 +129,14 @@ int cam_req_mgr_debug_register(struct cam_req_mgr_core_device *core_dev) debugfs_root, core_dev, &bubble_recovery)) return -ENOMEM; if (!debugfs_create_u32("delay_detect_count", 0644, debugfs_root, &cam_debug_mgr_delay_detect)) return -ENOMEM; return 0; } void cam_req_mgr_debug_delay_detect(void) { cam_debug_mgr_delay_detect += 1; }
drivers/cam_req_mgr/cam_req_mgr_debug.h +5 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_REQ_MGR_DEBUG_H_ Loading @@ -11,4 +11,8 @@ int cam_req_mgr_debug_register(struct cam_req_mgr_core_device *core_dev); /* cam_req_mgr_debug_delay_detect() * @brief : increment debug_fs varaible by 1 whenever delay occurred. */ void cam_req_mgr_debug_delay_detect(void); #endif