Browse Source

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: Vishalsingh Hajeri <[email protected]>
Signed-off-by: Mukund Madhusudan Atre <[email protected]>
Vishalsingh Hajeri 6 years ago
parent
commit
b2bd543adf
1 changed files with 30 additions and 0 deletions
  1. 30 0
      drivers/cam_isp/cam_isp_context.c

+ 30 - 0
drivers/cam_isp/cam_isp_context.c

@@ -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;
 }