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

Commit 285620c9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Prevent locking same spin_lock twice"

parents c253738b b631a473
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1003,7 +1003,6 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev,
	unsigned long flags;
	struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;

	spin_lock_irqsave(&vfe_dev->shared_data_lock, flags);
	for (i = 0; i < MAX_NUM_STREAM; i++) {
		if (SRC_TO_INTF(axi_data->stream_info[i].stream_src) !=
			frame_src) {
@@ -1030,9 +1029,11 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev,
		}
	}

	spin_lock_irqsave(&vfe_dev->shared_data_lock, flags);
	if (vfe_dev->axi_data.stream_update[frame_src]) {
		vfe_dev->axi_data.stream_update[frame_src]--;
	}
	spin_unlock_irqrestore(&vfe_dev->shared_data_lock, flags);

	if (vfe_dev->axi_data.pipeline_update == DISABLE_CAMIF ||
		(vfe_dev->axi_data.pipeline_update ==
@@ -1044,8 +1045,6 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev,

	if (vfe_dev->axi_data.stream_update[frame_src] == 0)
		complete(&vfe_dev->stream_config_complete);

	spin_unlock_irqrestore(&vfe_dev->shared_data_lock, flags);
}

static void msm_isp_reload_ping_pong_offset(struct vfe_device *vfe_dev,
@@ -1730,8 +1729,13 @@ static int msm_isp_axi_wait_for_cfg_done(struct vfe_device *vfe_dev,
		msecs_to_jiffies(VFE_MAX_CFG_TIMEOUT));
	if (rc == 0) {
		for (i = 0; i < VFE_SRC_MAX; i++) {
			if (src_mask & (1 << i))
			if (src_mask & (1 << i)) {
				spin_lock_irqsave(&vfe_dev->shared_data_lock,
					flags);
				vfe_dev->axi_data.stream_update[i] = 0;
				spin_unlock_irqrestore(&vfe_dev->
					shared_data_lock, flags);
			}
		}
		pr_err("%s: wait timeout\n", __func__);
		rc = -EBUSY;