camera: dump out RCE snapshot on CAMRTC_HSP_PANIC

- implemented a panic callback function which dumps out
  the snapshot section of the RCE trace buffer.
- registered the panic callback function with hsp handle
  during handle init time.
- when receiving the CAMRTC_HSP_PANIC from RCE, trigger
  the panic callback function to dump out the RCE snapshot.

Jira CAMERASW-32243

Change-Id: I523a0b51637a6cf1091d578195c75090b52ffcd7
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341536
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
yizhou
2025-04-15 23:37:19 +00:00
committed by Jon Hunter
parent d68f89d225
commit 4736728ec1
5 changed files with 233 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef INCLUDE_RTCPU_HSP_COMBO_H
@@ -32,5 +32,8 @@ int camrtc_hsp_get_fw_hash(struct camrtc_hsp *camhsp,
int camrtc_hsp_set_operating_point(struct camrtc_hsp *camhsp,
uint32_t operating_point);
int camrtc_hsp_set_panic_callback(struct camrtc_hsp *camhsp,
void (*panic_callback)(struct device *dev));
#endif /* INCLUDE_RTCPU_HSP_COMBO_H */

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef _LINUX_TEGRA_RTCPU_TRACE_H_
@@ -17,5 +17,7 @@ struct tegra_rtcpu_trace *tegra_rtcpu_trace_create(
int tegra_rtcpu_trace_boot_sync(struct tegra_rtcpu_trace *tracer);
void tegra_rtcpu_trace_flush(struct tegra_rtcpu_trace *tracer);
void tegra_rtcpu_trace_destroy(struct tegra_rtcpu_trace *tracer);
void rtcpu_trace_snapshot(struct tegra_rtcpu_trace *tracer);
void rtcpu_trace_panic_callback(struct device *dev);
#endif