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

Commit 6e757850 authored by Ayush Kumar's avatar Ayush Kumar Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Fix IRQ delay handling logic



Delayed IRQ handling logic measures time deference between 2 consecutive
IRQs (RUP, EPOCH BUF_DONE), if time difference is greater then 1 frame
time than, it assumes that IRQs are merged.
If KMD does not apply any request, then delay handling logic measures
delta between two epochs IRQs, which should be 1 frame time, which will
be considered delay and fence error will be signaled.
This patch handles above case.

CRs-Fixed: 2639997
Change-Id: I72ea46171d867ec7ae6e2852110a3ef10df81cf1
Signed-off-by: default avatarAyush Kumar <ayushkr@codeaurora.org>
Signed-off-by: default avatarTrishansh Bhardwaj <tbhardwa@codeaurora.org>
parent 3aa681b6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -589,6 +589,10 @@ static int __cam_isp_ctx_handle_buf_done_in_activated_state(
	trace_cam_buf_done("ISP", ctx, req);

	req_isp = (struct cam_isp_ctx_req *) req->req_priv;

	if (ctx_isp->active_req_cnt == 1)
		ctx_isp->irq_delay_detect = false;

	if (ctx_isp->frame_id == 1)
		ctx_isp->irq_timestamps = done->irq_mono_boot_time;
	else if (ctx_isp->fps && ((done->irq_mono_boot_time -