msm: camera: req_mgr: LDAR Debug framework implementation

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.
To debug the cause for this situation and to dump
the information, user space sends a dump command to the
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 implements the framework for traversal
across the RT and NRT devices.

CRs-Fixed: 2602180
Change-Id: I7e24006c20c23bfab163a2ad13b4ac6e2913bb9e
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
This commit is contained in:
Gaurav Jindal
2019-10-14 15:08:23 +05:30
committed by Gerrit - the friendly Code Review server
parent 14b75bff2d
commit d95d140d40
12 changed files with 477 additions and 1 deletions

View File

@@ -262,6 +262,8 @@ struct cam_req_mgr_link_control {
#define CAM_REQ_MGR_CACHE_OPS (CAM_COMMON_OPCODE_MAX + 12)
#define CAM_REQ_MGR_LINK_CONTROL (CAM_COMMON_OPCODE_MAX + 13)
#define CAM_REQ_MGR_LINK_V2 (CAM_COMMON_OPCODE_MAX + 14)
#define CAM_REQ_MGR_REQUEST_DUMP (CAM_COMMON_OPCODE_MAX + 15)
/* end of cam_req_mgr opcodes */
#define CAM_MEM_FLAG_HW_READ_WRITE (1<<0)