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

Commit 96417b5f authored by Harsh Shah's avatar Harsh Shah Committed by Shubhraprakash Das
Browse files

msm: camera: isp: Avoid race between tasklet and deinit buf_mgr



Call tasklet disable and flush in close node before deinit_buf_mgr so that
no tasklet is scheduled or run when freeing buf and bufq.
Also continue with stop_stream even if stream is in wrong state so that
HW is stopped on time.

Change-Id: Ib6a7fbb7b50f3685344038ee457f315dea21b724
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent 94344b5a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -407,6 +407,7 @@ int msm_isp_axi_check_stream_state(
					__func__, stream_info->state);
				spin_unlock_irqrestore(
					&stream_info->lock, flags);
				if (stream_cfg_cmd->cmd == START_STREAM)
					rc = -EINVAL;
				break;
			}
+1 −1
Original line number Diff line number Diff line
@@ -2112,8 +2112,8 @@ int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
	/* after regular hw stop, reduce open cnt */
	vfe_dev->vfe_open_cnt--;

	vfe_dev->buf_mgr->ops->buf_mgr_deinit(vfe_dev->buf_mgr);
	vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev);
	vfe_dev->buf_mgr->ops->buf_mgr_deinit(vfe_dev->buf_mgr);
	if (vfe_dev->vt_enable) {
		msm_isp_end_avtimer();
		vfe_dev->vt_enable = 0;