Forráskód Böngészése

msm: camera: isp: Handle processing RUP_DONE prior to SOF

For RDI state machine add provision to post shutter for requests
that receive RUP_DONE prior to SOF. If the RUP_DONE is serviced
and acknowledged before SOF by the state machine, we need to
handle posting the shutter for that request at SOF otherwise
we would result in completely missing that shutter.

CRs-Fixed: 2971285
Change-Id: I6303520166c445fa7872dcffbd23a0a75d497387
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram 4 éve
szülő
commit
5de7b3b61c
1 módosított fájl, 12 hozzáadás és 2 törlés
  1. 12 2
      drivers/cam_isp/cam_isp_context.c

+ 12 - 2
drivers/cam_isp/cam_isp_context.c

@@ -4195,9 +4195,19 @@ static int __cam_isp_ctx_rdi_only_sof_in_top_state(
 			ctx_isp->frame_id);
 
 		/*
-		 * It is idle frame with out any applied request id, send
-		 * request id as zero
+		 * It's possible for rup done to be processed before
+		 * SOF, check for first active request shutter here
 		 */
+		if (!list_empty(&ctx->active_req_list)) {
+			struct cam_ctx_request  *req = NULL;
+
+			req = list_first_entry(&ctx->active_req_list,
+				struct cam_ctx_request, list);
+			if (req->request_id > ctx_isp->reported_req_id) {
+				request_id = req->request_id;
+				ctx_isp->reported_req_id = request_id;
+			}
+		}
 		__cam_isp_ctx_send_sof_timestamp(ctx_isp, request_id,
 			CAM_REQ_MGR_SOF_EVENT_SUCCESS);
 	} else {