From 93f25fccc80cf7e3103beaabf44c70a70c52da62 Mon Sep 17 00:00:00 2001 From: Depeng Shao Date: Tue, 13 Apr 2021 13:54:28 +0800 Subject: [PATCH] msm: camera: isp: Mask process_bubble for SHDR usecase SHDR usecase doesn't report bubble to CRM, but we still need to know whether it is processing bubble during applying request, since we may haven't received the reg update of the previous applied request, then we have a chance to apply a new req to HW, this may result in overflow issue. This change masks the process_bubble for SHDR case during epoch in applied sub state. CRs-Fixed: 2948932 Change-Id: I699a2f59ea874693b78a918895db98727b95c634 Signed-off-by: Depeng Shao --- drivers/cam_isp/cam_isp_context.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/cam_isp/cam_isp_context.c b/drivers/cam_isp/cam_isp_context.c index 60f974ff94e7..00af70d8a093 100644 --- a/drivers/cam_isp/cam_isp_context.c +++ b/drivers/cam_isp/cam_isp_context.c @@ -864,6 +864,18 @@ static int __cam_isp_ctx_handle_buf_done_for_req_list( list_add_tail(&req->list, &ctx->free_req_list); req_isp->reapply = false; req_isp->cdm_reset_before_apply = false; + req_isp->num_acked = 0; + req_isp->num_deferred_acks = 0; + req_isp->bubble_detected = false; + /* + * Only update the process_bubble and bubble_frame_cnt + * when bubble is detected on this req, in case the other + * request is processing bubble. + */ + if (req_isp->bubble_detected) { + atomic_set(&ctx_isp->process_bubble, 0); + ctx_isp->bubble_frame_cnt = 0; + } CAM_DBG(CAM_REQ, "Move active request %lld to free list(cnt = %d) [all fences done], ctx %u", @@ -2101,6 +2113,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp, ctx_isp->frame_id, ctx->ctx_id); } } + atomic_set(&ctx_isp->process_bubble, 1); } /* @@ -2336,6 +2349,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( ctx_isp->frame_id, ctx->ctx_id); } } + atomic_set(&ctx_isp->process_bubble, 1); } /*