msm: camera: icp: Always dump HW Info when requested by LDAR dump

There is a possiblity to enter the function without any currently
active frames to dump. Even though the context info should be dumped.
In this case overwrite frame ts to 0 and dump the HW info.

CRs-Fixed: 3298809
Change-Id: Ide672f0ff8ac3f351fc4be1933bb23afbcf923f2
Signed-off-by: Petar Ivanov <quic_pivanov@quicinc.com>
Dieser Commit ist enthalten in:
Petar Ivanov
2022-09-19 07:24:46 -07:00
committet von Camera Software Integration
Ursprung d576b613dd
Commit c5aa5a71eb
2 geänderte Dateien mit 9 neuen und 23 gelöschten Zeilen

Datei anzeigen

@@ -5897,7 +5897,6 @@ static int cam_icp_mgr_hw_dump(void *hw_priv, void *hw_dump_args)
size_t remain_len;
uint8_t *dst;
uint32_t min_len;
uint64_t diff;
uint64_t *addr, *start;
uint64_t *clk_addr, *clk_start;
uint32_t *mgr_addr, *mgr_start;
@@ -5911,6 +5910,7 @@ static int cam_icp_mgr_hw_dump(void *hw_priv, void *hw_dump_args)
struct cam_icp_dump_header *hdr;
struct cam_icp_hw_dump_args icp_dump_args;
struct hfi_frame_process_info *frm_process;
bool frame_found = false;
if ((!hw_priv) || (!hw_dump_args)) {
CAM_ERR(CAM_ICP, "Invalid params %pK %pK",
@@ -5918,6 +5918,8 @@ static int cam_icp_mgr_hw_dump(void *hw_priv, void *hw_dump_args)
return -EINVAL;
}
memset(&req_ts, 0, sizeof(struct timespec64));
dump_args = (struct cam_hw_dump_args *)hw_dump_args;
hw_mgr = hw_priv;
ctx_data = dump_args->ctxt_to_hw_map;
@@ -5927,23 +5929,13 @@ static int cam_icp_mgr_hw_dump(void *hw_priv, void *hw_dump_args)
if ((frm_process->request_id[i] ==
dump_args->request_id) &&
frm_process->fw_process_flag[i])
goto hw_dump;
frame_found = true;
}
return 0;
hw_dump:
cur_time = ktime_get();
diff = ktime_us_delta(frm_process->submit_timestamp[i], cur_time);
cur_ts = ktime_to_timespec64(cur_time);
req_ts = ktime_to_timespec64(frm_process->submit_timestamp[i]);
if (diff < CAM_ICP_CTX_RESPONSE_TIME_THRESHOLD) {
CAM_INFO(CAM_ICP, "No Error req %lld %ld:%06ld %ld:%06ld",
dump_args->request_id,
req_ts.tv_sec,
req_ts.tv_nsec/NSEC_PER_USEC,
cur_ts.tv_sec,
cur_ts.tv_nsec/NSEC_PER_USEC);
return 0;
cur_time = ktime_get();
cur_ts = ktime_to_timespec64(cur_time);
if (frame_found) {
req_ts = ktime_to_timespec64(frm_process->submit_timestamp[i]);
}
CAM_INFO(CAM_ICP, "Error req %lld %ld:%06ld %ld:%06ld",
@@ -6025,7 +6017,7 @@ hw_dump:
hdr->word_size = sizeof(uint64_t);
addr = (uint64_t *)(dst + sizeof(struct cam_icp_dump_header));
start = addr;
*addr++ = frm_process->request_id[i];
*addr++ = dump_args->request_id;
*addr++ = req_ts.tv_sec;
*addr++ = req_ts.tv_nsec / NSEC_PER_USEC;
*addr++ = cur_ts.tv_sec;

Datei anzeigen

@@ -71,12 +71,6 @@
/* Current appliacble vote paths, based on number of UAPI definitions */
#define CAM_ICP_MAX_PER_PATH_VOTES 6
/*
* Response time threshold in ms beyond which a request is not expected
* to be with ICP hw
*/
#define CAM_ICP_CTX_RESPONSE_TIME_THRESHOLD 300000
struct hfi_mini_dump_info;
/**