Commit b88e0ee7 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: Drop streamoff_mutex

Now that __atomisp_streamoff() no longer drops isp->mutex to cancel
the watchdog timer, the streamoff_mutex is no longer necessary to
avoid multiple streamoffs racing with each other.
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 1636369b
......@@ -822,7 +822,6 @@ static int atomisp_release(struct file *file)
if (!isp)
return -EBADF;
mutex_lock(&isp->streamoff_mutex);
mutex_lock(&isp->mutex);
dev_dbg(isp->dev, "release device %s\n", vdev->name);
......@@ -909,7 +908,6 @@ static int atomisp_release(struct file *file)
V4L2_SEL_TGT_COMPOSE, 0,
&clear_compose);
mutex_unlock(&isp->mutex);
mutex_unlock(&isp->streamoff_mutex);
return v4l2_fh_release(file);
}
......
......@@ -239,12 +239,6 @@ struct atomisp_device {
/* 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];
......
......@@ -1872,7 +1872,6 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
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");
......@@ -2081,11 +2080,9 @@ static int atomisp_streamoff(struct file *file, void *fh,
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;
}
......
......@@ -1482,7 +1482,6 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
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. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment