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: Venkat Chinta <vchinta@codeaurora.org>
This commit is contained in:
Venkat Chinta
2019-09-11 15:54:56 -07:00
committed by Gerrit - the friendly Code Review server
parent f7d89d9bed
commit 00abd8feda

View File

@@ -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);
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);
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);
}
} else {
if (ctx_isp->reported_req_id < buf_done_req_id) {
ctx_isp->reported_req_id = buf_done_req_id;