msm: camera: common: LDAR dump NRT devices 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 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 dumps the information for NRT devices; JPEG, LRME, FD and ICP. For LRME, FD, JPEG context information is dumped. FOR ICP, fw image is dumped. Change-Id: I123e9b8289521a40d88156ba9bd0003ad9602f01 CRs-Fixed: 2602180 Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
This commit is contained in:

committed by
Venkat Chinta

parent
8d05aad1b0
commit
dbc2111c4f
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -117,6 +117,19 @@ static int __cam_fd_ctx_release_dev_in_activated(struct cam_context *ctx,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int __cam_fd_ctx_dump_dev_in_activated(
|
||||
struct cam_context *ctx,
|
||||
struct cam_dump_req_cmd *cmd)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = cam_context_dump_dev_to_hw(ctx, cmd);
|
||||
if (rc)
|
||||
CAM_ERR(CAM_FD, "Failed to dump device, rc=%d", rc);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int __cam_fd_ctx_flush_dev_in_activated(struct cam_context *ctx,
|
||||
struct cam_flush_dev_cmd *cmd)
|
||||
{
|
||||
@@ -198,6 +211,7 @@ static struct cam_ctx_ops
|
||||
.release_dev = __cam_fd_ctx_release_dev_in_activated,
|
||||
.config_dev = __cam_fd_ctx_config_dev_in_activated,
|
||||
.flush_dev = __cam_fd_ctx_flush_dev_in_activated,
|
||||
.dump_dev = __cam_fd_ctx_dump_dev_in_activated,
|
||||
},
|
||||
.crm_ops = {},
|
||||
.irq_ops = __cam_fd_ctx_handle_irq_in_activated,
|
||||
|
Reference in New Issue
Block a user