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

Commit 62e84fe0 authored by Abhishek Kondaveeti's avatar Abhishek Kondaveeti
Browse files

msm: isp: Handle pingpong bit mismatch gracefully



Ping pong mismatch occurs when the interrupts miss happens.
Handle this scenario properly by sending error to userspace.

Change-Id: Idd8f9979a9b0e8c6a1989dd89ed6b98ccaa54ac9
Signed-off-by: default avatarAbhishek Kondaveeti <akondave@codeaurora.org>
parent 3b3deef7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2016, 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
@@ -679,7 +679,10 @@ static int msm_isp_update_put_buf_cnt_unsafe(
			bufq->stream_id, buf_info->state);
			return -EFAULT;
		}
		BUG_ON(buf_info->pingpong_bit != pingpong_bit);
		if (buf_info->pingpong_bit != pingpong_bit) {
			pr_err("%s: Pingpong bit mismatch\n", __func__);
			return -EFAULT;
		}
	}

	if (bufq->buf_type != ISP_SHARE_BUF ||