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

Commit 10084264 authored by Jing Zhou's avatar Jing Zhou Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Do not return error for get_buf null



In case of continuous stream, buffers may not be available during
stream ON time. It will get enqueued later. Do not return error
for get_buf null during init_stream_ping_pong().

Change-Id: Ie616f0ff9e3538fe342d067c6b83df1686b628ac
Signed-off-by: default avatarJing Zhou <jzhou70@codeaurora.org>
parent cc957303
Loading
Loading
Loading
Loading
+34 −14
Original line number Diff line number Diff line
@@ -2179,6 +2179,7 @@ static int msm_isp_init_stream_ping_pong_reg(
	if ((vfe_dev->is_split && vfe_dev->pdev->id == 1 &&
		stream_info->stream_src < RDI_INTF_0) ||
		!vfe_dev->is_split || stream_info->stream_src >= RDI_INTF_0) {
		if (stream_info->stream_type == BURST_STREAM) {
			/* Set address for both PING & PONG register */
			rc = msm_isp_cfg_ping_pong_address(vfe_dev,
				stream_info, VFE_PING_FLAG, 0);
@@ -2188,8 +2189,7 @@ static int msm_isp_init_stream_ping_pong_reg(
				return rc;
			}

		if (stream_info->stream_type != BURST_STREAM ||
			stream_info->runtime_num_burst_capture > 1)
			if (stream_info->runtime_num_burst_capture > 1)
				rc = msm_isp_cfg_ping_pong_address(vfe_dev,
					stream_info, VFE_PONG_FLAG, 0);

@@ -2198,6 +2198,26 @@ static int msm_isp_init_stream_ping_pong_reg(
					__func__);
				return rc;
			}
		} else if (stream_info->stream_type == CONTINUOUS_STREAM) {
			rc = msm_isp_cfg_ping_pong_address(vfe_dev,
				stream_info, VFE_PING_FLAG, 0);
			if (rc < 0 && rc != ENOMEM) {
				pr_err("%s: config error for ping\n",
				__func__);
				return rc;
			}
			rc = msm_isp_cfg_ping_pong_address(vfe_dev,
				stream_info, VFE_PONG_FLAG, 0);
			if (rc < 0 && rc != ENOMEM) {
				pr_err("%s: config error for pong\n",
				__func__);
				return rc;
			}
		} else {
			rc = -1;
			pr_err("%s:%d failed invalid stream type %d", __func__,
				__LINE__, stream_info->stream_type);
		}
	}

	return rc;