Skip to content

Commit

Permalink
[media] s5p-fimc: Prevent lock up caused by incomplete H/W initializa…
Browse files Browse the repository at this point in the history
…tion

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>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Jan 6, 2012
1 parent f1d99f3 commit f664684
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/media/video/s5p-fimc/fimc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f664684

Please sign in to comment.