Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19724c31 authored by Suresh Vankadara's avatar Suresh Vankadara Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Dump registers based on debugfs" into dev/msm-4.14-camx

parents b81e5191 05358170
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1079,6 +1079,8 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp,
	}

	req_isp = (struct cam_isp_ctx_req *) req_to_dump->req_priv;

	if (error_event_data->enable_reg_dump)
		cam_isp_ctx_dump_req(req_isp);

	__cam_isp_ctx_update_state_monitor_array(ctx_isp,
+13 −0
Original line number Diff line number Diff line
@@ -4312,6 +4312,8 @@ static int cam_ife_hw_mgr_get_err_type(

	core_idx = evt_payload->core_index;
	evt_payload->evt_id = CAM_ISP_HW_EVENT_ERROR;
	evt_payload->enable_reg_dump =
		g_ife_hw_mgr.debug_cfg.enable_reg_dump;

	list_for_each_entry(isp_ife_camif_res,
		&ife_hwr_mgr_ctx->res_list_ife_src, list) {
@@ -4399,6 +4401,9 @@ static int cam_ife_hw_mgr_handle_camif_error(
		error_event_data.error_type =
				CAM_ISP_HW_ERROR_OVERFLOW;

		error_event_data.enable_reg_dump =
			g_ife_hw_mgr.debug_cfg.enable_reg_dump;

		cam_ife_hw_mgr_find_affected_ctx(ife_hwr_mgr_ctx,
			&error_event_data,
			core_idx,
@@ -5376,6 +5381,14 @@ static int cam_ife_hw_mgr_debug_register(void)
		goto err;
	}

	if (!debugfs_create_u32("enable_reg_dump",
		0644,
		g_ife_hw_mgr.debug_cfg.dentry,
		&g_ife_hw_mgr.debug_cfg.enable_reg_dump)) {
		CAM_ERR(CAM_ISP, "failed to create enable_reg_dump");
		goto err;
	}

	if (!debugfs_create_file("ife_camif_debug",
		0644,
		g_ife_hw_mgr.debug_cfg.dentry, NULL,
+2 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ struct ctx_base_info {
 * @csid_debug:                csid debug information
 * @enable_recovery:           enable recovery
 * @enable_diag_sensor_status: enable sensor diagnosis status
 * @enable_reg_dump:           enable register dump on error
 *
 */
struct cam_ife_hw_mgr_debug {
@@ -95,6 +96,7 @@ struct cam_ife_hw_mgr_debug {
	uint64_t       csid_debug;
	uint32_t       enable_recovery;
	uint32_t       camif_debug;
	uint32_t       enable_reg_dump;
};

/**
+2 −0
Original line number Diff line number Diff line
@@ -196,11 +196,13 @@ struct cam_isp_hw_eof_event_data {
 * @timestamp:             Timestamp for the error event
 * @recovery_enabled:      Identifies if the context needs to recover & reapply
 *                         this request
 * @enable_reg_dump:       enable register dump
 */
struct cam_isp_hw_error_event_data {
	uint32_t             error_type;
	uint64_t             timestamp;
	bool                 recovery_enabled;
	bool                 enable_reg_dump;
};

/* enum cam_isp_hw_mgr_command - Hardware manager command type */
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -232,6 +232,7 @@ struct cam_vfe_bw_control_args {
 * @irq_reg_val:             IRQ and Error register values, read when IRQ was
 *                           handled
 * @error_type:              Identify different errors
 * @enable_reg_dump:         enable register dump on error
 * @ts:                      Timestamp
 */
struct cam_vfe_top_irq_evt_payload {
@@ -241,6 +242,7 @@ struct cam_vfe_top_irq_evt_payload {
	uint32_t                   evt_id;
	uint32_t                   irq_reg_val[CAM_IFE_IRQ_REGISTERS_MAX];
	uint32_t                   error_type;
	bool                       enable_reg_dump;
	struct cam_isp_timestamp   ts;
};

Loading