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

Commit 9462fce2 authored by Konstantin Motov's avatar Konstantin Motov Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Lock buffer manager operations



Since buffer manager might be called for different user space
thread buffer manager operations should be locked.

Change-Id: I4f1840986ecb671fbec0454231caf0c80460b356
Signed-off-by: default avatarKonstantin Motov <kmotov@codeaurora.org>
parent aa5efdb9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -529,6 +529,7 @@ static int vfe_probe(struct platform_device *pdev)
	platform_set_drvdata(pdev, &vfe_dev->subdev.sd);
	mutex_init(&vfe_dev->realtime_mutex);
	mutex_init(&vfe_dev->core_mutex);
	mutex_init(&vfe_dev->buf_mgr_mutex);
	spin_lock_init(&vfe_dev->tasklet_lock);
	spin_lock_init(&vfe_dev->shared_data_lock);
	spin_lock_init(&req_history_lock);
+1 −0
Original line number Diff line number Diff line
@@ -572,6 +572,7 @@ struct vfe_device {
	struct completion stats_config_complete;
	struct mutex realtime_mutex;
	struct mutex core_mutex;
	struct mutex buf_mgr_mutex;

	atomic_t irq_cnt;
	uint8_t taskletq_idx;
+2 −0
Original line number Diff line number Diff line
@@ -740,7 +740,9 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd,
	case VIDIOC_MSM_ISP_REQUEST_BUF:
	case VIDIOC_MSM_ISP_ENQUEUE_BUF:
	case VIDIOC_MSM_ISP_RELEASE_BUF: {
		mutex_lock(&vfe_dev->buf_mgr_mutex);
		rc = msm_isp_proc_buf_cmd(vfe_dev->buf_mgr, cmd, arg);
		mutex_unlock(&vfe_dev->buf_mgr_mutex);
		break;
	}
	case VIDIOC_MSM_ISP_REQUEST_STREAM: