diff options
author | Abhishek Kondaveeti <akondave@codeaurora.org> | 2016-02-01 11:45:28 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:22:49 -0700 |
commit | ab75fe5eea912b7ac936fd2335c2c4d669ff9c88 (patch) | |
tree | 2ca02231f9ccd6f37a640b25b502fe51d9723db2 | |
parent | a2b1739e1ed92fe0b8eeae5bbe4ea4f348515b90 (diff) |
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: Abhishek Kondaveeti <akondave@codeaurora.org>
-rw-r--r-- | drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c index 9072af7287b0..b958ee838c1b 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c @@ -1,4 +1,4 @@ -/* 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 @@ -681,7 +681,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 || |