From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81209C3A59F for ; Mon, 26 Aug 2019 18:31:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 627D421883 for ; Mon, 26 Aug 2019 18:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732457AbfHZSbE (ORCPT ); Mon, 26 Aug 2019 14:31:04 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50506 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731340AbfHZSbE (ORCPT ); Mon, 26 Aug 2019 14:31:04 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 29AC0281888; Mon, 26 Aug 2019 19:31:01 +0100 (BST) Date: Mon, 26 Aug 2019 20:30:58 +0200 From: Boris Brezillon To: Jernej Skrabec Cc: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, paul.kocialkowski@bootlin.com, mripard@kernel.org, pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, tfiga@chromium.org, wens@csie.org, acourbot@chromium.org, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, ezequiel@collabora.com, jonas@kwiboo.se Subject: Re: [PATCH 2/8] videodev2.h: add V4L2_DEC_CMD_FLUSH Message-ID: <20190826203058.0b3ffece@collabora.com> In-Reply-To: <20190822194500.2071-3-jernej.skrabec@siol.net> References: <20190822194500.2071-1-jernej.skrabec@siol.net> <20190822194500.2071-3-jernej.skrabec@siol.net> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Aug 2019 21:44:54 +0200 Jernej Skrabec wrote: > From: Hans Verkuil > > Add this new V4L2_DEC_CMD_FLUSH decoder command and document it. > > Signed-off-by: Hans Verkuil > Signed-off-by: Jernej Skrabec Reviewed-by: Boris Brezillon > --- > Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 11 ++++++++++- > Documentation/media/videodev2.h.rst.exceptions | 1 + > include/uapi/linux/videodev2.h | 1 + > 3 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst > index 57f0066f4cff..0bffef6058f7 100644 > --- a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst > +++ b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst > @@ -208,7 +208,16 @@ introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decod > been started yet, the driver will return an ``EPERM`` error code. When > the decoder is already running, this command does nothing. No > flags are defined for this command. > - > + * - ``V4L2_DEC_CMD_FLUSH`` > + - 4 > + - Flush any held capture buffers. Only valid for stateless decoders, > + and only if ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` was set. > + This command is typically used when the application reached the > + end of the stream and the last output buffer had the > + ``V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF`` flag set. This would prevent > + dequeueing the last capture buffer containing the last decoded frame. > + So this command can be used to explicitly flush that last decoded > + frame. > > Return Value > ============ > diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions > index adeb6b7a15cb..a79028e4d929 100644 > --- a/Documentation/media/videodev2.h.rst.exceptions > +++ b/Documentation/media/videodev2.h.rst.exceptions > @@ -434,6 +434,7 @@ replace define V4L2_DEC_CMD_START decoder-cmds > replace define V4L2_DEC_CMD_STOP decoder-cmds > replace define V4L2_DEC_CMD_PAUSE decoder-cmds > replace define V4L2_DEC_CMD_RESUME decoder-cmds > +replace define V4L2_DEC_CMD_FLUSH decoder-cmds > > replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds > replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 4fa9f543742d..91a79e16089c 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -1978,6 +1978,7 @@ struct v4l2_encoder_cmd { > #define V4L2_DEC_CMD_STOP (1) > #define V4L2_DEC_CMD_PAUSE (2) > #define V4L2_DEC_CMD_RESUME (3) > +#define V4L2_DEC_CMD_FLUSH (4) > > /* Flags for V4L2_DEC_CMD_START */ > #define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95A5CC3A59F for ; Mon, 26 Aug 2019 18:31:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B7E82184D for ; Mon, 26 Aug 2019 18:31:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JlXBFHws" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B7E82184D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O6Q2Lt9yuRBZuuhxHobPdT7RH06ZynfupWeJ5RxdEQQ=; b=JlXBFHwsk0IYGq 4wVUPcBi9S0/RI3JBhh0LoG27cQ3YSezWzzFuyvyWqt3cH/QQSt8bPD2RFrOkGGqMEcZLTK5kWPGG CwrOxTp9C1ZhYOajrh15NkOBgWZ93l3cgZ/T0S062zjVmeFJDglJ0Pj59Mn6itz2r7qowFQaRxgmr nvioKdpCQkWA5xPUFpPagjUVJEHQ87oGpBehiQciujl7MJQhCAcFgFbI1JyvAho84IHj2R3/VbdhG Qyf5qBvrYnTC3TqmbulqpB0gRRp8XFqTPruoDj33qSFZ4NDqz6OD5Txav49Ycs4R2TP6szFX+9ZWb m/wyyS6u8Ic2HNKxQPjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i2Jli-0005Tv-94; Mon, 26 Aug 2019 18:31:06 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i2Jlf-0005TZ-5v for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2019 18:31:04 +0000 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 29AC0281888; Mon, 26 Aug 2019 19:31:01 +0100 (BST) Date: Mon, 26 Aug 2019 20:30:58 +0200 From: Boris Brezillon To: Jernej Skrabec Subject: Re: [PATCH 2/8] videodev2.h: add V4L2_DEC_CMD_FLUSH Message-ID: <20190826203058.0b3ffece@collabora.com> In-Reply-To: <20190822194500.2071-3-jernej.skrabec@siol.net> References: <20190822194500.2071-1-jernej.skrabec@siol.net> <20190822194500.2071-3-jernej.skrabec@siol.net> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190826_113103_490766_A3D2A0E8 X-CRM114-Status: GOOD ( 21.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, acourbot@chromium.org, pawel@osciak.com, jonas@kwiboo.se, gregkh@linuxfoundation.org, wens@csie.org, mripard@kernel.org, tfiga@chromium.org, paul.kocialkowski@bootlin.com, kyungmin.park@samsung.com, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, ezequiel@collabora.com, linux-kernel@vger.kernel.org, m.szyprowski@samsung.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 22 Aug 2019 21:44:54 +0200 Jernej Skrabec wrote: > From: Hans Verkuil > > Add this new V4L2_DEC_CMD_FLUSH decoder command and document it. > > Signed-off-by: Hans Verkuil > Signed-off-by: Jernej Skrabec Reviewed-by: Boris Brezillon > --- > Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 11 ++++++++++- > Documentation/media/videodev2.h.rst.exceptions | 1 + > include/uapi/linux/videodev2.h | 1 + > 3 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst > index 57f0066f4cff..0bffef6058f7 100644 > --- a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst > +++ b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst > @@ -208,7 +208,16 @@ introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decod > been started yet, the driver will return an ``EPERM`` error code. When > the decoder is already running, this command does nothing. No > flags are defined for this command. > - > + * - ``V4L2_DEC_CMD_FLUSH`` > + - 4 > + - Flush any held capture buffers. Only valid for stateless decoders, > + and only if ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` was set. > + This command is typically used when the application reached the > + end of the stream and the last output buffer had the > + ``V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF`` flag set. This would prevent > + dequeueing the last capture buffer containing the last decoded frame. > + So this command can be used to explicitly flush that last decoded > + frame. > > Return Value > ============ > diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions > index adeb6b7a15cb..a79028e4d929 100644 > --- a/Documentation/media/videodev2.h.rst.exceptions > +++ b/Documentation/media/videodev2.h.rst.exceptions > @@ -434,6 +434,7 @@ replace define V4L2_DEC_CMD_START decoder-cmds > replace define V4L2_DEC_CMD_STOP decoder-cmds > replace define V4L2_DEC_CMD_PAUSE decoder-cmds > replace define V4L2_DEC_CMD_RESUME decoder-cmds > +replace define V4L2_DEC_CMD_FLUSH decoder-cmds > > replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds > replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 4fa9f543742d..91a79e16089c 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -1978,6 +1978,7 @@ struct v4l2_encoder_cmd { > #define V4L2_DEC_CMD_STOP (1) > #define V4L2_DEC_CMD_PAUSE (2) > #define V4L2_DEC_CMD_RESUME (3) > +#define V4L2_DEC_CMD_FLUSH (4) > > /* Flags for V4L2_DEC_CMD_START */ > #define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel