summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-fimc
diff options
context:
space:
mode:
authorSylwester Nawrocki2011-11-17 10:23:21 +0100
committerMauro Carvalho Chehab2012-01-06 15:59:42 +0100
commitf664684a56deb7675363e2fa3f1e2a5eedbb3222 (patch)
tree1cbf41d964328e5aee0ecca5b5f8df824f2aaaf6 /drivers/media/video/s5p-fimc
parent[media] firedtv: handle errors from dvb_net_init (diff)
downloadkernel-qcow2-linux-f664684a56deb7675363e2fa3f1e2a5eedbb3222.tar.gz
kernel-qcow2-linux-f664684a56deb7675363e2fa3f1e2a5eedbb3222.tar.xz
kernel-qcow2-linux-f664684a56deb7675363e2fa3f1e2a5eedbb3222.zip
[media] s5p-fimc: Prevent lock up caused by incomplete H/W initialization
The following ioctl sequence causes fimc_dma_run() to start processing without complete scaler and DMA initialization which causes missing interrupt and blocking on DQBUF: S_FMT, STREAMON, QBUF, DQBUF, STREAMOFF, STREAMON, QBUF, DQBUF. Fix this regression caused by moving pm_runtime* calls to start/stop_streaming callback by making sure the fimc_m2m_resume() is always invoked when expected. Reported-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-fimc')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c
index 4aaaf1de3a17..f5cbb8a4c540 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.c
+++ b/drivers/media/video/s5p-fimc/fimc-core.c
@@ -1784,9 +1784,8 @@ static int fimc_runtime_resume(struct device *dev)
/* Resume the capture or mem-to-mem device */
if (fimc_capture_busy(fimc))
return fimc_capture_resume(fimc);
- else if (fimc_m2m_pending(fimc))
- return fimc_m2m_resume(fimc);
- return 0;
+
+ return fimc_m2m_resume(fimc);
}
static int fimc_runtime_suspend(struct device *dev)