Commit 76323e50 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Mauro Carvalho Chehab

[media] s5p-fimc: Add error checks for pipeline stream on callbacks

set_stream error for pipelines is logged or reported to user
space if possible.
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent fc39f46b
...@@ -286,7 +286,7 @@ static int start_streaming(struct vb2_queue *q, unsigned int count) ...@@ -286,7 +286,7 @@ static int start_streaming(struct vb2_queue *q, unsigned int count)
fimc_activate_capture(ctx); fimc_activate_capture(ctx);
if (!test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state)) if (!test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state))
fimc_pipeline_call(fimc, set_stream, return fimc_pipeline_call(fimc, set_stream,
&fimc->pipeline, 1); &fimc->pipeline, 1);
} }
...@@ -443,12 +443,17 @@ static void buffer_queue(struct vb2_buffer *vb) ...@@ -443,12 +443,17 @@ static void buffer_queue(struct vb2_buffer *vb)
if (vb2_is_streaming(&vid_cap->vbq) && if (vb2_is_streaming(&vid_cap->vbq) &&
vid_cap->active_buf_cnt >= min_bufs && vid_cap->active_buf_cnt >= min_bufs &&
!test_and_set_bit(ST_CAPT_STREAM, &fimc->state)) { !test_and_set_bit(ST_CAPT_STREAM, &fimc->state)) {
int ret;
fimc_activate_capture(ctx); fimc_activate_capture(ctx);
spin_unlock_irqrestore(&fimc->slock, flags); spin_unlock_irqrestore(&fimc->slock, flags);
if (!test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state)) if (test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state))
fimc_pipeline_call(fimc, set_stream, return;
&fimc->pipeline, 1);
ret = fimc_pipeline_call(fimc, set_stream, &fimc->pipeline, 1);
if (ret < 0)
v4l2_err(&vid_cap->vfd, "stream on failed: %d\n", ret);
return; return;
} }
spin_unlock_irqrestore(&fimc->slock, flags); spin_unlock_irqrestore(&fimc->slock, flags);
......
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