瀏覽代碼

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)