From 7e0fea6d1cb7423dd6e2d3de3c333e91f2f2f658 Mon Sep 17 00:00:00 2001 From: Venkat Chinta Date: Tue, 18 Jun 2019 18:57:01 -0700 Subject: [PATCH] msm: camera: ife: Add dentry to enable req dump This change adds a dentry to enable req dump in the case of hardware errors. CRs-Fixed: 2513939 Change-Id: I0ae5d6c658964bf33d0e4c1775413aaa9201f7a1 Signed-off-by: Venkat Chinta --- drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c | 13 +++++++++++-- drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) 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 89b96ca65f4c..c9f950ca921a 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 @@ -6038,8 +6038,9 @@ static int cam_ife_hw_mgr_handle_hw_err( if (g_ife_hw_mgr.debug_cfg.enable_recovery) error_event_data.recovery_enabled = true; - else - error_event_data.recovery_enabled = false; + + if (g_ife_hw_mgr.debug_cfg.enable_req_dump) + error_event_data.enable_req_dump = true; rc = cam_ife_hw_mgr_find_affected_ctx(&error_event_data, core_idx, &recovery_data); @@ -6502,6 +6503,14 @@ static int cam_ife_hw_mgr_debug_register(void) goto err; } + if (!debugfs_create_bool("enable_req_dump", + 0644, + g_ife_hw_mgr.debug_cfg.dentry, + &g_ife_hw_mgr.debug_cfg.enable_req_dump)) { + CAM_ERR(CAM_ISP, "failed to create enable_req_dump"); + goto err; + } + if (!debugfs_create_file("ife_camif_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, diff --git a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h index ffd0a3ec090f..05ee264e93c9 100644 --- a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h +++ b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h @@ -90,7 +90,7 @@ struct cam_ife_hw_mgr_debug { uint64_t csid_debug; uint32_t enable_recovery; uint32_t camif_debug; - uint32_t enable_req_dump; + bool enable_req_dump; }; /**