Received: by 10.223.164.202 with SMTP id h10csp1014968wrb; Fri, 17 Nov 2017 12:24:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMav1RVEo5KPSPsDHcpnzznzFBz5xdrbQM1TPJcygGdq0ue2g+KObvG1wlAATs+ocqYq1kWW X-Received: by 10.84.128.197 with SMTP id a63mr6359524pla.210.1510950241601; Fri, 17 Nov 2017 12:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510950241; cv=none; d=google.com; s=arc-20160816; b=y4ps6ja3bC4+atCp+tNOo6GZgs+pDSoXfw9wzI5xvzmJP4e3Y3hR9v32qL9KCVcAgC qAgR+65ngPaemnPDwdZfm5DNA8vKK1ne0pE2uCL1ixEpESgx0o64JWhJiIYikY+kpeZO 2NetvfwX7C1b+4HAnG96iFF15S7ta08tHuy9hSzFs/In6aduPHA6iVdSAj95lfLSgNHR Y3MoDg+pCm+bv2SmcKPsgxFyb/WNepmbVAC3GK6eBYIJgQRroZFS9/2dYuUcxt8c6EMv uSDU6nJxBRCAwpPM4cYmLhNFKSRgLfa8xrkdf19RmUSnbqve2OGgCSWo47dDiIitIlhF fnBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=072UFz/CfMkPthx4HOsDz8iVi6UgWtRDo0hLjZAVsXo=; b=F/QrbX5UsHUMcLPlNX+curgDBrc8eyJ99ajVJeYOjH3GkZyJn/x6wyxCWFjtX0e62h dhUc22DoV8J2yqZi/Bs2w22raJPXbRtNKwSHWgjj2cEEfs3qCQDvvNK6hEPHXP0u0V3I 7diqRMCqJDe0jHAn5gji9M3nmgnWhbqwGrmkVAaeYza8WqIZbNc6r0JVg5fJlRXYh7FL +NEN98/slf88YGmt58hlXLyrkUf5IsBzh0BBp2IlinxQX3g5Fqv2bItmMOZG8/JlfYJl 3xNOLyekoMNMUq8jDyigMdNICzVYwZKhbsSXjrSDnkDfWt8MUYjW6O/15d+37g3/gn8V lM5A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i70si3268381pgc.36.2017.11.17.12.23.47; Fri, 17 Nov 2017 12:24:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755496AbdKQMXV (ORCPT + 93 others); Fri, 17 Nov 2017 07:23:21 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:36471 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbdKQMXN (ORCPT ); Fri, 17 Nov 2017 07:23:13 -0500 Received: by mail-qt0-f195.google.com with SMTP id a19so5504767qtb.3; Fri, 17 Nov 2017 04:23:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=072UFz/CfMkPthx4HOsDz8iVi6UgWtRDo0hLjZAVsXo=; b=JoEXln1mdwTTn1NbRivvldPHcBSt2KkFO6E7Kfdf3xE/5ls/lv2nz3pik6pAmSs9uu 84YWL1ReX+u5LeaMpIyaoGa0EulQP7IPAbg3exQISAC1jmRyuZy3lFYp3kgY6HwtAlGH rJqtUkiyJ73VfSqvFhB27VRXi1qPb8b8vvjo8nRjsCGQdKpOMcxhM3qci2yjIuIo9lRR Mgg7G4OU0rTqdtdE9NbAORJ3vYzNaQnIqCdgjLsbN6o111wy6RZYSY5CF0kJiaUiVrme eMtnMG10MCg9Awq5P3RUJoDfLd7UqhwQB0O5QlbdHzqHbyXGS9CvzXoWoMKu8KD6DYrR 5Wuw== X-Gm-Message-State: AJaThX6Eu+42y0586rTVOKj5JpKRll7JaND8exXIX1tNpzS0uBwkjyt/ k3O8NjEtYob30P0sV3D2vNSgvzzN X-Received: by 10.55.87.199 with SMTP id l190mr7789925qkb.30.1510921392152; Fri, 17 Nov 2017 04:23:12 -0800 (PST) Received: from jade ([179.97.166.229]) by smtp.gmail.com with ESMTPSA id e96sm2320973qtb.84.2017.11.17.04.23.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Nov 2017 04:23:11 -0800 (PST) Date: Fri, 17 Nov 2017 10:23:05 -0200 From: Gustavo Padovan To: Mauro Carvalho Chehab 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: <20171117122305.GE19033@jade> References: <20171115171057.17340-1-gustavo@padovan.org> <20171115171057.17340-2-gustavo@padovan.org> <20171117095731.2172c3c2@vento.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171117095731.2172c3c2@vento.lan> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-17 Mauro Carvalho Chehab : > 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. Thanks for clarifying, Mauro. I'll work on making it part of v4l2_fmtdesc. Gustavo From 1584163032071302506@xxx Wed Nov 15 19:53:16 +0000 2017 X-GM-THRID: 1584163032071302506 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread