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

Commit 9040f690 authored by Wyes Karny's avatar Wyes Karny
Browse files

msm: camera: isp: Handle incorrect bubble frame count



In the case of tasklet congession SOF timestamp is same for all
scheduled EPOCH tasklets. If SOF timestamp is same do not increment the
bubble frame count.

CRs-Fixed: 2881777
Change-Id: Ib98ea07f5640c814c87876887cf38aeb53de3e87
Signed-off-by: default avatarWyes Karny <wkarny@codeaurora.org>
parent 34cbbdd6
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/*
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/debugfs.h>
#include <linux/debugfs.h>
@@ -1236,6 +1236,14 @@ static int __cam_isp_ctx_notify_sof_in_activated_state(
			return rc;
			return rc;
		}
		}


		if (ctx_isp->last_sof_timestamp ==
			ctx_isp->sof_timestamp_val) {
			CAM_DBG(CAM_ISP,
				"Tasklet delay detected! Bubble frame check skipped, sof_timestamp: %lld",
				ctx_isp->sof_timestamp_val);
			goto notify_only;
		}

		req = list_first_entry(&ctx->active_req_list,
		req = list_first_entry(&ctx->active_req_list,
			struct cam_ctx_request, list);
			struct cam_ctx_request, list);
		req_isp = (struct cam_isp_ctx_req *) req->req_priv;
		req_isp = (struct cam_isp_ctx_req *) req->req_priv;
@@ -1275,6 +1283,8 @@ static int __cam_isp_ctx_notify_sof_in_activated_state(
				req->request_id, ctx->ctx_id, ctx->link_hdl);
				req->request_id, ctx->ctx_id, ctx->link_hdl);
	}
	}


notify_only:

	if (ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_trigger &&
	if (ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_trigger &&
		ctx_isp->active_req_cnt <= 2) {
		ctx_isp->active_req_cnt <= 2) {
		if (ctx_isp->subscribe_event & CAM_TRIGGER_POINT_SOF) {
		if (ctx_isp->subscribe_event & CAM_TRIGGER_POINT_SOF) {