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

Commit b2bd543a authored by Vishalsingh Hajeri's avatar Vishalsingh Hajeri Committed by Mukund Madhusudan Atre
Browse files

msm: camera: isp: Dump page fault info for pending request



If bubble report is set from usersapce we move the active
request back to pending request list while handling error.
We need to iterate through pending request list as well
when dumping page fault info for erroneous request.

Change-Id: I2458313affbae6cb161f077eef7bdd0263c43ae2
Signed-off-by: default avatarVishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: default avatarMukund Madhusudan Atre <matre@codeaurora.org>
parent 05b312bc
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -3876,6 +3876,36 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
				req->request_id, rc);
	}

	/*
	 * In certain scenarios we observe both overflow and SMMU pagefault
	 * for a particular request. If overflow is handled before page fault
	 * we need to traverse through pending request list because if
	 * bubble recovery is enabled on any request we move that request
	 * and all the subsequent requests to the pending list while handling
	 * overflow error.
	 */

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

	list_for_each_entry_safe(req, req_temp,
		&ctx->pending_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;
}