From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([92.198.50.35]:43489 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754104AbbCFKSf (ORCPT ); Fri, 6 Mar 2015 05:18:35 -0500 From: Philipp Zabel To: linux-media@vger.kernel.org Cc: Hans Verkuil , Pawel Osciak , Kamil Debski , Laurent Pinchart , Nicolas Dufresne , Sakari Ailus , kernel@pengutronix.de, Philipp Zabel Subject: [PATCH v3 4/5] [media] s5p-mfc: Set last buffer flag Date: Fri, 6 Mar 2015 11:18:29 +0100 Message-Id: <1425637110-12100-5-git-send-email-p.zabel@pengutronix.de> In-Reply-To: <1425637110-12100-1-git-send-email-p.zabel@pengutronix.de> References: <1425637110-12100-1-git-send-email-p.zabel@pengutronix.de> Sender: linux-media-owner@vger.kernel.org List-ID: Setting the last buffer flag causes the videobuf2 core to return -EPIPE from DQBUF calls on the capture queue after the last buffer is dequeued. Signed-off-by: Philipp Zabel --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 8e44a59..f08d639 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -211,6 +211,7 @@ static void s5p_mfc_handle_frame_all_extracted(struct s5p_mfc_ctx *ctx) dst_buf->b->v4l2_buf.field = V4L2_FIELD_NONE; else dst_buf->b->v4l2_buf.field = V4L2_FIELD_INTERLACED; + dst_buf->b->v4l2_buf.flags |= V4L2_BUF_FLAG_LAST; ctx->dec_dst_flag &= ~(1 << dst_buf->b->v4l2_buf.index); vb2_buffer_done(dst_buf->b, VB2_BUF_STATE_DONE); -- 2.1.4