소스 검색

msm: camera: isp: Check for epoch before applying

When there is a delay in offline ife workqueue scheduling
it is possible that two requests are applied back to back.
This could lead to requests lost. Therefore we must check
for epoch flag before applying any request.

CRs-Fixed: 2686281
Change-Id: I323710a61301d79e78db22dc1f66a6a0f141389a
Signed-off-by: Venkat Chinta <[email protected]>
Venkat Chinta 5 년 전
부모
커밋
4544e11ed9
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      drivers/cam_isp/cam_isp_context.c

+ 3 - 1
drivers/cam_isp/cam_isp_context.c

@@ -1108,7 +1108,9 @@ static int __cam_isp_ctx_apply_req_offline(
 		goto end;
 	}
 
-	if (ctx->state != CAM_CTX_ACTIVATED)
+	if ((ctx->state != CAM_CTX_ACTIVATED) ||
+		(!atomic_read(&ctx_isp->rxd_epoch)) ||
+		(ctx_isp->substate_activated == CAM_ISP_CTX_ACTIVATED_APPLIED))
 		goto end;
 
 	if (ctx_isp->active_req_cnt >= 2)