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

Commit 8f927f03 authored by Jing Zhou's avatar Jing Zhou Committed by Shubhraprakash Das
Browse files

msm: camera: isp: fix an issue in scratch buffer configuration



When configure the scratch buffer, wrong pingpong bit location is
programmed. So the VFE hardware can still write to the same buffer
which has been diverted to other camera compoment. This cause the image
corruption.

Change-Id: I6d5cfe0c00a237efb3ab3dff87459341736d45a7
Signed-off-by: default avatarJing Zhou <jzhou70@codeaurora.org>
parent bf1f2607
Loading
Loading
Loading
Loading
+5 −5
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
@@ -91,11 +91,11 @@ void msm_isp_halt_send_error(struct vfe_device *vfe_dev, uint32_t event);

static inline void msm_isp_cfg_wm_scratch(struct vfe_device *vfe_dev,
				int wm,
				uint32_t pingpong_status)
				uint32_t pingpong_bit)
{
	vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr(
		vfe_dev->vfe_base, wm,
		pingpong_status, vfe_dev->buf_mgr->scratch_buf_addr, 0);
		pingpong_bit, vfe_dev->buf_mgr->scratch_buf_addr, 0);
}

static inline void msm_isp_cfg_stream_scratch(struct vfe_device *vfe_dev,
@@ -105,10 +105,10 @@ static inline void msm_isp_cfg_stream_scratch(struct vfe_device *vfe_dev,
	int i;
	uint32_t pingpong_bit;

	pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1);
	for (i = 0; i < stream_info->num_planes; i++)
		msm_isp_cfg_wm_scratch(vfe_dev, stream_info->wm[i],
				pingpong_status);
	pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1);
				~pingpong_bit);
	stream_info->buf[pingpong_bit] = NULL;
}