Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3476bc16 authored by Depeng Shao's avatar Depeng Shao
Browse files

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: default avatarDepeng Shao <depengs@codeaurora.org>
parent 0a3354e6
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
// 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)
+1 −4
Original line number Diff line number Diff line
/* 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.
 */

#ifndef _CAM_CUSTOM_CONTEXT_H_
@@ -94,8 +94,6 @@ struct cam_custom_dev_ctx_req {
 * @state: Common context state
 * @hw_ctx: HW object returned by the acquire device command
 * @init_received: Indicate whether init config packet is received
 * @subscribe_event: The irq event mask that CRM subscribes to,
 *                   custom HW will invoke CRM cb at those event.
 * @active_req_cnt: Counter for the active request
 * @frame_id: Frame id tracking for the custom context
 * @hw_acquired: Flag to indicate if HW is acquired for this context
@@ -113,7 +111,6 @@ struct cam_custom_context {
	uint32_t                       state;
	void                          *hw_ctx;
	bool                           init_received;
	uint32_t                       subscribe_event;
	uint32_t                       active_req_cnt;
	int64_t                        frame_id;
	bool                           hw_acquired;
+1 −2
Original line number Diff line number Diff line
@@ -4567,11 +4567,10 @@ static int __cam_isp_ctx_config_dev_in_top_state(
		} else 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;
			add_req.trigger_eof = false;
			rc = ctx->ctx_crm_intf->add_req(&add_req);
			if (rc) {
				CAM_ERR(CAM_ISP, "Add req failed: req id=%llu",
+242 −147

File changed.

Preview size limit exceeded, changes collapsed.

+26 −19

File changed.

Preview size limit exceeded, changes collapsed.

Loading