diff options
author | Kamil Debski <k.debski@samsung.com> | 2013-01-11 12:29:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-12 12:38:56 -0300 |
commit | a34026e75bd1e6fdfbe8b59c320bb7d31c84b3da (patch) | |
tree | f41f223c059238337befc5145456a7310d3f623d /drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | |
parent | 81e096c8ac6a064854c2157e0bf802dc4906678c (diff) | |
download | blackbird-op-linux-a34026e75bd1e6fdfbe8b59c320bb7d31c84b3da.tar.gz blackbird-op-linux-a34026e75bd1e6fdfbe8b59c320bb7d31c84b3da.zip |
[media] s5p-mfc: Add support for EOS command and EOS event in video decoder
Add support for V4L2_DEC_CMD_STOP command which will instruct MFC device
to finish decoding and release all remaining frames kept for reference to
the user. After dequeueing last decoded frame the driver will generate an
V4L2_EVENT_EOS event.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyngmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c index c7ad329ca889..0af05a2d1cd4 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c @@ -1188,6 +1188,15 @@ static int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx, int last_frame) unsigned long flags; unsigned int index; + if (ctx->state == MFCINST_FINISHING) { + last_frame = MFC_DEC_LAST_FRAME; + s5p_mfc_set_dec_stream_buffer_v5(ctx, 0, 0, 0); + dev->curr_ctx = ctx->num; + s5p_mfc_clean_ctx_int_flags(ctx); + s5p_mfc_decode_one_frame_v5(ctx, last_frame); + return 0; + } + spin_lock_irqsave(&dev->irqlock, flags); /* Frames are being decoded */ if (list_empty(&ctx->src_queue)) { |