diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-01-18 12:02:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-05 17:40:36 -0200 |
commit | 03878bb473bb46cf8514223d8c955420b1ef73bc (patch) | |
tree | 2586d8c7f05b58d6a1c2342298348a40121c9f81 /drivers/media/platform/s5p-fimc/fimc-lite-reg.c | |
parent | 81b9f70210b62e256cf63eb8f703042ef44e4cdd (diff) | |
download | linux-stable-03878bb473bb46cf8514223d8c955420b1ef73bc.tar.gz linux-stable-03878bb473bb46cf8514223d8c955420b1ef73bc.tar.bz2 linux-stable-03878bb473bb46cf8514223d8c955420b1ef73bc.zip |
[media] s5p-fimc: fimc-lite: Prevent deadlock at STREAMON/OFF ioctls
This patch fixes regression introduced in commit 6319d6a002beb26631
'[media] fimc-lite: Add ISP FIFO output support'.
In case of a configuration where video is captured at the video node
exposed by the FIMC-LITE driver there is a following video pipeline:
sensor -> MIPI-CSIS.n -> FIMC-LITE.n subdev -> FIMC-LITE.n video node
In this situation s_stream() handler of the FIMC-LITE.n is called
back from within VIDIOC_STREAMON/OFF ioctl of the FIMC-LITE.n video
node, through vb2_stream_on/off(), start/stop_streaming and
fimc_pipeline_call(set_stream). The fimc->lock mutex is already held
then, before invoking vidioc_streamon/off. So it must not be taken
again in the s_stream() callback in this case, to avoid a deadlock.
This patch makes fimc->out_path atomic_t so the mutex don't need
to be taken in the FIMC-LITE subdev s_stream() callback in the DMA
output case.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyugmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-lite-reg.c')
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-lite-reg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite-reg.c b/drivers/media/platform/s5p-fimc/fimc-lite-reg.c index ad63ebf082c5..962652da3b43 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite-reg.c +++ b/drivers/media/platform/s5p-fimc/fimc-lite-reg.c @@ -65,7 +65,7 @@ void flite_hw_set_interrupt_mask(struct fimc_lite *dev) u32 cfg, intsrc; /* Select interrupts to be enabled for each output mode */ - if (dev->out_path == FIMC_IO_DMA) { + if (atomic_read(&dev->out_path) == FIMC_IO_DMA) { intsrc = FLITE_REG_CIGCTRL_IRQ_OVFEN | FLITE_REG_CIGCTRL_IRQ_LASTEN | FLITE_REG_CIGCTRL_IRQ_STARTEN; |