msm: camera: isp: LDAR Dump ISP information
When user space detects an error or does not receive response for a request, Lets do a reset(LDAR) is triggered. Before LDAR, user space sends flush command to the kernel space. In order to debug the cause for this situation and to dump the information, user space sends a dump command to kernel space before sending flush. As a part of this command, it passes the culprit request id and the buffer into which the information can be dumped. Kernel space traverses across the drivers and find the culprit hw and dumps the relevant information in the buffer. This data is written to a file for offline processing. This commit dumps the IFE, CSID registers, LUT tables and context information, cmd buffers, timestamps information for submit, apply, RUP, epoch and buffdones of the last 20 requests. CRs-Fixed: 2612116 Change-Id: If83db59458c1e5ad778f3fa90cbc730122491c54 Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
2460a8e82a
commit
e3f5738e43
@@ -41,6 +41,9 @@
|
||||
#define DDR_TYPE_LPDDR5 8
|
||||
#define DDR_TYPE_LPDDR5X 9
|
||||
|
||||
/* Maximum length of tag while dumping */
|
||||
#define CAM_SOC_HW_DUMP_TAG_MAX_LEN 32
|
||||
|
||||
/**
|
||||
* enum cam_vote_level - Enum for voting level
|
||||
*
|
||||
@@ -218,6 +221,34 @@ struct cam_hw_soc_info {
|
||||
void *soc_private;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_hw_soc_dump_header - SOC dump header
|
||||
*
|
||||
* @Brief: soc hw dump header
|
||||
*
|
||||
* @tag: Tag name for the header
|
||||
* @word_size: Size of each word
|
||||
* @size: Total size of dumped data
|
||||
*/
|
||||
struct cam_hw_soc_dump_header {
|
||||
uint8_t tag[CAM_SOC_HW_DUMP_TAG_MAX_LEN];
|
||||
uint64_t size;
|
||||
uint32_t word_size;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_hw_soc_dump_args: SOC Dump args
|
||||
*
|
||||
* @request_id: Issue request id
|
||||
* @offset: Buffer offset, updated as the informaton is dumped
|
||||
* @buf_handle: Buffer handle of the out buffer
|
||||
*/
|
||||
struct cam_hw_soc_dump_args {
|
||||
uint64_t request_id;
|
||||
size_t offset;
|
||||
uint32_t buf_handle;
|
||||
};
|
||||
|
||||
/*
|
||||
* CAM_SOC_GET_REG_MAP_START
|
||||
*
|
||||
@@ -636,19 +667,23 @@ typedef int (*cam_soc_util_regspace_data_cb)(uint32_t reg_base_type,
|
||||
/**
|
||||
* cam_soc_util_reg_dump_to_cmd_buf()
|
||||
*
|
||||
* @brief: Camera SOC util for dumping sets of register ranges to
|
||||
* to command buffer
|
||||
* @brief: Camera SOC util for dumping sets of register ranges
|
||||
* command buffer
|
||||
*
|
||||
* @ctx: Context info from specific hardware manager
|
||||
* @cmd_desc: Command buffer descriptor
|
||||
* @req_id: Last applied req id for which reg dump is required
|
||||
* @reg_data_cb: Callback function to get reg space info based on type
|
||||
* in command buffer
|
||||
*
|
||||
* @return: Success or Failure
|
||||
* @ctx: Context info from specific hardware manager
|
||||
* @cmd_desc: Command buffer descriptor
|
||||
* @req_id: Last applied req id for which reg dump is required
|
||||
* @reg_data_cb: Callback function to get reg space info based on type
|
||||
* in command buffer
|
||||
* @soc_dump_args: Dump buffer args to dump the soc information.
|
||||
* @user_triggered_dump: Flag to indicate if the dump request is issued by
|
||||
* user.
|
||||
* @return: Success or Failure
|
||||
*/
|
||||
int cam_soc_util_reg_dump_to_cmd_buf(void *ctx,
|
||||
struct cam_cmd_buf_desc *cmd_desc, uint64_t req_id,
|
||||
cam_soc_util_regspace_data_cb reg_data_cb);
|
||||
cam_soc_util_regspace_data_cb reg_data_cb,
|
||||
struct cam_hw_soc_dump_args *soc_dump_args,
|
||||
bool user_triggered_dump);
|
||||
|
||||
#endif /* _CAM_SOC_UTIL_H_ */
|
||||
|
Reference in New Issue
Block a user