Received: by 10.223.164.202 with SMTP id h10csp1078669wrb; Fri, 17 Nov 2017 13:33:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMaBvElJi38Fvhe2JfO1y7zk/zXwIbErC8tH9fuYgpL5idZ7rlRUP/cxJbd7cvgspzavSEDP X-Received: by 10.84.131.111 with SMTP id 102mr6563050pld.178.1510954427583; Fri, 17 Nov 2017 13:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510954427; cv=none; d=google.com; s=arc-20160816; b=PfVq9gXB7SwKAJzX3vpzQ3tu3XHysroj6gkdRcWo2HhFXEDPp7zvd/iPvfXYi1/btf 2JR1AGW0dLimb+KJtuBoWZHaf4y5aFLFsahwOtb1Qn5Cuoup3n6tVsMhhOZLvMW0rS1l h12dVTrfNc1/V2OzBVACHbMqVE35ZHpTL4qvXYhcEOpaR6Nizgqg0wsWYFz5h1Hk8nKL 8VEnVcAnlPPPsXYIgtwyq7vqH6sCDFm6ogfjmkeSzteST6yLS1dlWRX6Tem1/gvRA23o sDz17iW4GGIu+M75Qwa7WsM0s0xZS1HsK+mPqJDuk1Ko5wytKrbPlx8+Y4FglPgnhChS rVKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=35ZguSKXFcFibgZqSy89uyKVtYTfHUER3UpzKS8SA0s=; b=k/vFPSi7cmrjiSSjXp/VZ7zbEpAR+vrsXOW91+/rBwU3Tawf5T1ngPzFKK6E5s/TN0 eEaNaPvXOOouiXnuyB7EvZ5ot02sJCkEWEKb1y6mRjJ9Z7vgXXO1HJdd06QXrAH5Bnd0 fgPYGUR3pa4zOyBgzOKSSAsMqB7ukbkojXF1vJQw3U8bFXYAuPN5cGdPZvmWolqzajIp VYUhY94UiIXC+0ff1McxpnaWl0Wi/ngcGB8a510C13pYWbgvGhCzwmmXfsDi9bPUIMuX gFg7lbwrzAiaEXgYy4xjcAaUDuHJIpbYzSmrKGnITlUeSWSEOw4+wZi6tl9/4e3Xc1Yz kzsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7si3367660pgp.139.2017.11.17.13.33.33; Fri, 17 Nov 2017 13:33:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755310AbdKQL5r (ORCPT + 93 others); Fri, 17 Nov 2017 06:57:47 -0500 Received: from osg.samsung.com ([64.30.133.232]:63017 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754945AbdKQL5j (ORCPT ); Fri, 17 Nov 2017 06:57:39 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 27C4E2B186; Fri, 17 Nov 2017 03:57:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hN_kQFJ_kYxX; Fri, 17 Nov 2017 03:57:37 -0800 (PST) Received: from vento.lan (177.17.214.168.dynamic.adsl.gvt.net.br [177.17.214.168]) by osg.samsung.com (Postfix) with ESMTPSA id CF9802B179; Fri, 17 Nov 2017 03:57:34 -0800 (PST) Date: Fri, 17 Nov 2017 09:57:31 -0200 From: Mauro Carvalho Chehab To: Gustavo Padovan Cc: linux-media@vger.kernel.org, Hans Verkuil , Shuah Khan , Pawel Osciak , Alexandre Courbot , Sakari Ailus , Brian Starkey , Thierry Escande , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: Re: [RFC v5 01/11] [media] v4l: add V4L2_CAP_ORDERED to the uapi Message-ID: <20171117095731.2172c3c2@vento.lan> In-Reply-To: <20171115171057.17340-2-gustavo@padovan.org> References: <20171115171057.17340-1-gustavo@padovan.org> <20171115171057.17340-2-gustavo@padovan.org> Organization: Samsung X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; 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 Em Wed, 15 Nov 2017 15:10:47 -0200 Gustavo Padovan escreveu: > From: Gustavo Padovan > > When using explicit synchronization userspace needs to know if > the queue can deliver everything back in the same order, so we added > a new capability that drivers can use to report that they are capable > of keeping ordering. > > In videobuf2 core when using fences we also make sure to keep the ordering > of buffers, so if the driver guarantees it too the whole pipeline inside > V4L2 will be ordered and the V4L2_CAP_ORDERED should be used. > > Signed-off-by: Gustavo Padovan > --- > Documentation/media/uapi/v4l/vidioc-querycap.rst | 3 +++ > include/uapi/linux/videodev2.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst b/Documentation/media/uapi/v4l/vidioc-querycap.rst > index 66fb1b3d6e6e..ed3daa814da9 100644 > --- a/Documentation/media/uapi/v4l/vidioc-querycap.rst > +++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst > @@ -254,6 +254,9 @@ specification the ioctl returns an ``EINVAL`` error code. > * - ``V4L2_CAP_TOUCH`` > - 0x10000000 > - This is a touch device. > + * - ``V4L2_CAP_ORDERED`` > + - 0x20000000 > + - The device queue is ordered. > * - ``V4L2_CAP_DEVICE_CAPS`` > - 0x80000000 > - The driver fills the ``device_caps`` field. This capability can > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 185d6a0acc06..cd6fc1387f47 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -459,6 +459,7 @@ struct v4l2_capability { > #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ > > #define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */ > +#define V4L2_CAP_ORDERED 0x20000000 /* Is the device queue ordered */ I guess we discussed that at the Linux Media summit. The problem of making it a global flag is that drivers may support ordered formats only for some of the formats. E. g., a driver that delivers both MPEG and RGB output formats may deliver ordered buffers for RGB, and unordered ones for MPEG. So, instead of doing a global format at v4l2_capability, it is probably better to use the flags field at struct v4l2_fmtdesc. That would allow userspace to know in advance what formats support it, by calling VIDIOC_ENUM_FMT. Regards, Mauro From 1584346160480228864@xxx Fri Nov 17 20:24:01 +0000 2017 X-GM-THRID: 1584163032071302506 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread