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

Commit 9ee5c0ec authored by Peter Liu's avatar Peter Liu
Browse files

msm: camera: calculate RDI bandwidth properly



When requesting RDI AB/IB, need to consider the bit width of RDI interface.
Since bus interface expect a byte based calculation.

Change-Id: Ib01563250adaf967c411bf660ba9f9f516923625
Signed-off-by: default avatarPeter Liu <pingchie@codeaurora.org>
parent cc0af699
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -698,6 +698,7 @@ void msm_isp_calculate_bandwidth(
	struct msm_vfe_axi_shared_data *axi_data,
	struct msm_vfe_axi_stream *stream_info)
{
	int bpp = 0;
	if (stream_info->stream_src < RDI_INTF_0) {
		stream_info->bandwidth =
			(axi_data->src_info[VFE_PIX_0].pixel_clock /
@@ -707,9 +708,10 @@ void msm_isp_calculate_bandwidth(
			stream_info->format_factor / ISP_Q2;
	} else {
		int rdi = SRC_TO_INTF(stream_info->stream_src);
		bpp = msm_isp_get_bit_per_pixel(stream_info->output_format);
		if (rdi < VFE_SRC_MAX)
			stream_info->bandwidth =
				axi_data->src_info[rdi].pixel_clock;
				(axi_data->src_info[rdi].pixel_clock / 8) * bpp;
		else
			pr_err("%s: Invalid rdi interface\n", __func__);
	}