msm: camera: reqmgr: Handle flash properly

Apply the flash at EOF and apply the other devices
at the EPOCH of next frame, then the flash can
cover all the exposure zone of current request.
Add the inject delay for SOF and EOF separate,
then we can use inject delay for more flexible
frame skip control.

CRs-Fixed: 2820683
Change-Id: Ic6a58327a0ae44c54190884ba42ea7926ec7c90e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
This commit is contained in:
Depeng Shao
2020-11-24 16:44:47 +08:00
parent 0626095cbc
commit a8fce31f3f
9 changed files with 321 additions and 209 deletions

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/debugfs.h>
@@ -1266,10 +1266,10 @@ static int __cam_custom_ctx_config_dev(struct cam_context *ctx,
if ((ctx->state != CAM_CTX_FLUSHED) &&
(ctx->state >= CAM_CTX_READY) &&
(ctx->ctx_crm_intf->add_req)) {
memset(&add_req, 0, sizeof(add_req));
add_req.link_hdl = ctx->link_hdl;
add_req.dev_hdl = ctx->dev_hdl;
add_req.req_id = req->request_id;
add_req.skip_before_applying = 0;
rc = ctx->ctx_crm_intf->add_req(&add_req);
if (rc) {
CAM_ERR(CAM_CUSTOM,
@@ -1375,7 +1375,6 @@ static int __cam_custom_ctx_link_in_acquired(struct cam_context *ctx,
ctx->link_hdl = link->link_hdl;
ctx->ctx_crm_intf = link->crm_cb;
ctx_custom->subscribe_event = link->subscribe_event;
/* change state only if we had the init config */
if (ctx_custom->init_received)