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

Commit 97af5582 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Reapply bubble request in RDI path"

parents 947b3de2 46b20ccb
Loading
Loading
Loading
Loading
+29 −1
Original line number Diff line number Diff line
@@ -2839,6 +2839,7 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_applied(
		notify.req_id = req->request_id;
		notify.error = CRM_KMD_ERR_BUBBLE;
		ctx->ctx_crm_intf->notify_err(&notify);
		atomic_set(&ctx_isp->process_bubble, 1);
		CAM_DBG(CAM_ISP, "Notify CRM about Bubble frame %lld",
			ctx_isp->frame_id);
	} else {
@@ -2898,6 +2899,33 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_state(
	ctx_isp->boot_timestamp = sof_event_data->boot_time;
	CAM_DBG(CAM_ISP, "frame id: %lld time stamp:0x%llx",
		ctx_isp->frame_id, ctx_isp->sof_timestamp_val);

	if (atomic_read(&ctx_isp->process_bubble)) {
		if (list_empty(&ctx->active_req_list)) {
			CAM_ERR(CAM_ISP, "No available active req in bubble");
			atomic_set(&ctx_isp->process_bubble, 0);
			return -EINVAL;
		}

		req = list_first_entry(&ctx->active_req_list,
			struct cam_ctx_request, list);
		req_isp = (struct cam_isp_ctx_req *) req->req_priv;

		if (req_isp->bubble_detected) {
			req_isp->num_acked = 0;
			req_isp->bubble_detected = false;
			list_del_init(&req->list);
			list_add(&req->list, &ctx->pending_req_list);
			atomic_set(&ctx_isp->process_bubble, 0);
			ctx_isp->active_req_cnt--;
			CAM_DBG(CAM_REQ,
			"Move active req:%lld to pending list(cnt=%d) ctx:%u",
				req->request_id,
				ctx_isp->active_req_cnt, ctx->ctx_id);
			goto end;
		}
	}

	/*
	 * Signal all active requests with error and move the  all the active
	 * requests to free list
@@ -2918,7 +2946,7 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_state(
		list_add_tail(&req->list, &ctx->free_req_list);
		ctx_isp->active_req_cnt--;
	}

end:
	/* notify reqmgr with sof signal */
	if (ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_trigger) {
		notify.link_hdl = ctx->link_hdl;