if (!isp)
return -EBADF;
- mutex_lock(&isp->streamoff_mutex);
mutex_lock(&isp->mutex);
dev_dbg(isp->dev, "release device %s\n", vdev->name);
V4L2_SEL_TGT_COMPOSE, 0,
&clear_compose);
mutex_unlock(&isp->mutex);
- mutex_unlock(&isp->streamoff_mutex);
return v4l2_fh_release(file);
}
/* Purpose of mutex is to protect and serialize use of isp data
* structures and css API calls. */
struct mutex mutex;
- /*
- * Serialise streamoff: mutex is dropped during streamoff to
- * cancel the watchdog queue. MUST be acquired BEFORE
- * "mutex".
- */
- struct mutex streamoff_mutex;
unsigned int input_cnt;
struct atomisp_input_subdev inputs[ATOM_ISP_MAX_INPUTS];
atomisp_subdev_source_pad(vdev), asd->index);
lockdep_assert_held(&isp->mutex);
- lockdep_assert_held(&isp->streamoff_mutex);
if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
dev_dbg(isp->dev, "unsupported v4l2 buf type\n");
struct atomisp_device *isp = video_get_drvdata(vdev);
int rval;
- mutex_lock(&isp->streamoff_mutex);
mutex_lock(&isp->mutex);
rval = __atomisp_streamoff(file, fh, type);
mutex_unlock(&isp->mutex);
- mutex_unlock(&isp->streamoff_mutex);
return rval;
}
dev_dbg(&pdev->dev, "atomisp mmio base: %p\n", isp->base);
mutex_init(&isp->mutex);
- mutex_init(&isp->streamoff_mutex);
spin_lock_init(&isp->lock);
/* This is not a true PCI device on SoC, so the delay is not needed. */