Skip to content

Commit

Permalink
[media] s5p-fimc: Reinitialize the pipeline properly after VIDIOC_STR…
Browse files Browse the repository at this point in the history
…EAMOFF

This patch prevents blocking on DQBUF at a video capture node in some
conditions, after STREAOMOFF/STREAMON sequence. The ST_CAPT_SUSPEND
flag should not be set during normal stream off, otherwise the
capture engine is not properly enabled at stream on.

Reported-by: Bernard Debbasch <b.debbasch@ssi.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 Apr 10, 2012
1 parent 20676a4 commit aa33312
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/media/video/s5p-fimc/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ static int fimc_capture_state_cleanup(struct fimc_dev *fimc, bool suspend)

fimc->state &= ~(1 << ST_CAPT_RUN | 1 << ST_CAPT_SHUT |
1 << ST_CAPT_STREAM | 1 << ST_CAPT_ISP_STREAM);
if (!suspend)
if (suspend)
fimc->state |= (1 << ST_CAPT_SUSPENDED);
else
fimc->state &= ~(1 << ST_CAPT_PEND | 1 << ST_CAPT_SUSPENDED);

/* Release unused buffers */
Expand All @@ -99,7 +101,6 @@ static int fimc_capture_state_cleanup(struct fimc_dev *fimc, bool suspend)
else
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
}
set_bit(ST_CAPT_SUSPENDED, &fimc->state);

fimc_hw_reset(fimc);
cap->buf_index = 0;
Expand Down

0 comments on commit aa33312

Please sign in to comment.