Browse Source

msm: camera: isp: Handle the deferred buf done

Handle the deferred buf done in case of a back-to-back
bubble scenario.

CRs-Fixed: 3297235
Change-Id: I62a4fcd906742ffe20ad1648739528357870f20d
Signed-off-by: Chandan Kumar Jha <[email protected]>
Chandan Kumar Jha 2 years ago
parent
commit
1f4e9d51a6
1 changed files with 19 additions and 0 deletions
  1. 19 0
      drivers/cam_isp/cam_isp_context.c

+ 19 - 0
drivers/cam_isp/cam_isp_context.c

@@ -3161,6 +3161,25 @@ static int __cam_isp_ctx_epoch_in_bubble_applied(
 	CAM_DBG(CAM_ISP, "move request %lld to active list(cnt = %d) ctx %u",
 		req->request_id, ctx_isp->active_req_cnt, ctx->ctx_id);
 
+	/*
+	 * Handle the deferred buf done after moving
+	 * the bubble req to active req list.
+	 */
+	__cam_isp_ctx_handle_deferred_buf_done_in_bubble(
+		ctx_isp, req);
+
+	if (!req_isp->bubble_detected) {
+		req = list_first_entry(&ctx->pending_req_list, struct cam_ctx_request,
+			list);
+		req_isp->bubble_detected = true;
+		req_isp->reapply_type = CAM_CONFIG_REAPPLY_IO;
+		req_isp->cdm_reset_before_apply = false;
+		atomic_set(&ctx_isp->process_bubble, 1);
+		list_del_init(&req->list);
+		list_add_tail(&req->list, &ctx->active_req_list);
+		ctx_isp->active_req_cnt++;
+	}
+
 	if (!req_isp->bubble_report) {
 		if (req->request_id > ctx_isp->reported_req_id) {
 			request_id = req->request_id;