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

Commit 00abd8fe authored by Venkat Chinta's avatar Venkat Chinta Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Add check for last flush request ID



This change adds a check for last flush request ID before adding
bubbled request to pending list. This prevents the request from
sitting in pending list indefinitely.

CRs-Fixed: 2533433
Change-Id: I82d641d42fe507e8eabf0bee0e9a2f0b98d9a802
Signed-off-by: default avatarVenkat Chinta <vchinta@codeaurora.org>
parent f7d89d9b
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -619,12 +619,26 @@ static int __cam_isp_ctx_handle_buf_done_for_request(
		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);

		if (buf_done_req_id <= ctx->last_flush_req) {
			for (i = 0; i < req_isp->num_fence_map_out; i++)
				cam_sync_signal(
					req_isp->fence_map_out[i].sync_id,
					CAM_SYNC_STATE_SIGNALED_ERROR);

			list_add_tail(&req->list, &ctx->free_req_list);
			CAM_DBG(CAM_REQ,
				"Move active request %lld to free list(cnt = %d) [flushed], ctx %u",
				buf_done_req_id, ctx_isp->active_req_cnt,
				ctx->ctx_id);
		} else {
			list_add(&req->list, &ctx->pending_req_list);
			CAM_DBG(CAM_REQ,
				"Move active request %lld to pending list(cnt = %d) [bubble recovery], ctx %u",
			 req->request_id, ctx_isp->active_req_cnt, ctx->ctx_id);
				req->request_id, ctx_isp->active_req_cnt,
				ctx->ctx_id);
		}
	} else {
		if (ctx_isp->reported_req_id < buf_done_req_id) {
			ctx_isp->reported_req_id = buf_done_req_id;