Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc91741c authored by Alok Pandey's avatar Alok Pandey Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Additional information to ICP page fault handler



Add more debugging data in icp page fault handler. It dumps patches,
io buffer direction and frame data for IPE and BPS packets.

Change-Id: I94886fb3d73a56bdbf5c8e7a65ca53d13ceb34e2
Signed-off-by: default avatarAlok Pandey <akumarpa@codeaurora.org>
parent 966d4aa6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova,
		rc = ctx->state_machine[ctx->state].pagefault_ops(ctx, iova,
			buf_info);
	} else {
		CAM_WARN(CAM_CORE, "No dump ctx in dev %d, state %d",
		CAM_INFO(CAM_CORE, "No dump ctx in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
	}
	mutex_unlock(&ctx->ctx_mutex);
+1 −0
Original line number Diff line number Diff line
@@ -1021,6 +1021,7 @@ int32_t cam_context_dump_pf_info_to_hw(struct cam_context *ctx,
		cmd_args.ctxt_to_hw_map = ctx->ctxt_to_hw_map;
		cmd_args.cmd_type = CAM_HW_MGR_CMD_DUMP_PF_INFO;
		cmd_args.u.pf_args.pf_data.packet = packet;
		cmd_args.u.pf_args.pf_data.ctx_id = ctx->ctx_id;
		cmd_args.u.pf_args.iova = iova;
		cmd_args.u.pf_args.buf_info = buf_info;
		cmd_args.u.pf_args.mem_found = mem_found;
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -144,9 +144,11 @@ struct cam_hw_stop_args {
 * struct cam_hw_mgr_dump_pf_data - page fault debug data
 *
 * packet:     pointer to packet
 * ctx_id:     context id
 */
struct cam_hw_mgr_dump_pf_data {
	void    *packet;
	uint32_t ctx_id;
};

/**
+1 −1
Original line number Diff line number Diff line
@@ -1620,7 +1620,7 @@ static int cam_fd_mgr_hw_prepare_update(void *hw_mgr_priv,

	/* We do not expect any patching, but just do it anyway */
	rc = cam_packet_util_process_patches(prepare->packet,
		hw_mgr->device_iommu.non_secure, -1);
		hw_mgr->device_iommu.non_secure, -1, 0);
	if (rc) {
		CAM_ERR(CAM_FD, "Patch FD packet failed, rc=%d", rc);
		return rc;
+6 −2
Original line number Diff line number Diff line
@@ -73,24 +73,28 @@ void cam_hfi_queue_dump(void)
		qtbl_hdr->qtbl_num_q, qtbl_hdr->qtbl_qhdr_size);

	cmd_q_hdr = &qtbl->q_hdr[Q_CMD];
	CAM_DBG(CAM_HFI, "cmd: size = %u r_idx = %u w_idx = %u addr = %x",
	CAM_INFO(CAM_HFI, "cmd: size = %u r_idx = %u w_idx = %u addr = %x",
		cmd_q_hdr->qhdr_q_size, cmd_q_hdr->qhdr_read_idx,
		cmd_q_hdr->qhdr_write_idx, hfi_mem->cmd_q.iova);
	read_q = (uint32_t *)g_hfi->map.cmd_q.kva;
	read_ptr = (uint32_t *)(read_q + 0);
	CAM_INFO(CAM_HFI, "CMD Q %p", read_q);
	CAM_DBG(CAM_HFI, "CMD Q START");
	for (i = 0; i < ICP_CMD_Q_SIZE_IN_BYTES >> BYTE_WORD_SHIFT; i++)
		CAM_DBG(CAM_HFI, "Word: %d Data: 0x%08x ", i, read_ptr[i]);
	CAM_DBG(CAM_HFI, "CMD Q END");

	msg_q_hdr = &qtbl->q_hdr[Q_MSG];
	CAM_DBG(CAM_HFI, "msg: size = %u r_idx = %u w_idx = %u addr = %x",
	CAM_INFO(CAM_HFI, "msg: size = %u r_idx = %u w_idx = %u addr = %x",
		msg_q_hdr->qhdr_q_size, msg_q_hdr->qhdr_read_idx,
		msg_q_hdr->qhdr_write_idx, hfi_mem->msg_q.iova);
	read_q = (uint32_t *)g_hfi->map.msg_q.kva;
	read_ptr = (uint32_t *)(read_q + 0);
	CAM_INFO(CAM_HFI, "MSG Q %p", read_ptr);
	CAM_DBG(CAM_HFI, "MSG Q START");
	for (i = 0; i < ICP_MSG_Q_SIZE_IN_BYTES >> BYTE_WORD_SHIFT; i++)
		CAM_DBG(CAM_HFI, "Word: %d Data: 0x%08x ", i, read_ptr[i]);
	CAM_DBG(CAM_HFI, "MSG Q END");
}

int hfi_write_cmd(void *cmd_ptr)
Loading