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

Commit edbb3011 authored by Abhilash Kumar's avatar Abhilash Kumar
Browse files

msm: camera: isp: Add wait_list dump support during pagefault



Currently, we iterate only on the active list during pagefault
to dump relevant data. There is a little chance that the packet
is in wait list.
In this change we are adding the logic to iterate over wait_list
and minor modification in the logs.

Change-Id: Ib51054c95862fcef448035fa882e0ae009c8cc06
Signed-off-by: default avatarAbhilash Kumar <krabhi@codeaurora.org>
parent 7c481da6
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -3219,6 +3219,26 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
				req->request_id, rc);
	}

	CAM_INFO(CAM_ISP, "Iterating over wait_list of isp ctx %d state %d",
			ctx->ctx_id, ctx->state);

	list_for_each_entry_safe(req, req_temp,
		&ctx->wait_req_list, list) {
		req_isp = (struct cam_isp_ctx_req *) req->req_priv;
		hw_update_data = &req_isp->hw_update_data;
		pf_dbg_entry = &(req->pf_data);
		CAM_INFO(CAM_ISP, "req_id : %lld ", req->request_id);

		rc = cam_context_dump_pf_info_to_hw(ctx, pf_dbg_entry->packet,
			iova, buf_info, &mem_found);
		if (rc)
			CAM_ERR(CAM_ISP, "Failed to dump pf info");

		if (mem_found)
			CAM_ERR(CAM_ISP, "Found page fault in req %lld %d",
				req->request_id, rc);
	}

	return rc;
}

+9 −5
Original line number Diff line number Diff line
@@ -3337,7 +3337,7 @@ static void cam_ife_mgr_print_io_bufs(struct cam_packet *packet,
			if (GET_FD_FROM_HANDLE(io_cfg[i].mem_handle[j]) ==
				GET_FD_FROM_HANDLE(pf_buf_info)) {
				CAM_INFO(CAM_ISP,
					"Found PF at port: %d mem %x fd: %x",
					"Found PF at port: 0x%x mem 0x%x fd: 0x%x",
					io_cfg[i].resource_type,
					io_cfg[i].mem_handle[j],
					pf_buf_info);
@@ -3345,7 +3345,7 @@ static void cam_ife_mgr_print_io_bufs(struct cam_packet *packet,
					*mem_found = true;
			}

			CAM_INFO(CAM_ISP, "port: %d f: %u format: %d dir %d",
			CAM_INFO(CAM_ISP, "port: 0x%x f: %u format: %d dir %d",
				io_cfg[i].resource_type,
				io_cfg[i].fence,
				io_cfg[i].format,
@@ -3357,7 +3357,9 @@ static void cam_ife_mgr_print_io_bufs(struct cam_packet *packet,
			rc = cam_mem_get_io_buf(io_cfg[i].mem_handle[j],
				mmu_hdl, &iova_addr, &src_buf_size);
			if (rc < 0) {
				CAM_ERR(CAM_ISP, "get src buf address fail");
				CAM_ERR(CAM_ISP,
					"get src buf address fail mem_handle 0x%x",
					io_cfg[i].mem_handle[j]);
				continue;
			}
			if (iova_addr >> 32) {
@@ -3367,11 +3369,13 @@ static void cam_ife_mgr_print_io_bufs(struct cam_packet *packet,
			}

			CAM_INFO(CAM_ISP,
				"pln %d w %d h %d size %d addr 0x%x offset 0x%x memh %x",
				"pln %d w %d h %d s 0x%x addr 0x%x end_addr 0x%x offset %x memh %x",
				j, io_cfg[i].planes[j].width,
				io_cfg[i].planes[j].height,
				(int32_t)src_buf_size,
				(unsigned int)src_buf_size,
				(unsigned int)iova_addr,
				(unsigned int)iova_addr +
				(unsigned int)src_buf_size,
				io_cfg[i].offsets[j],
				io_cfg[i].mem_handle[j]);
		}