Received: by 10.223.185.111 with SMTP id b44csp588596wrg; Fri, 9 Mar 2018 09:54:12 -0800 (PST) X-Google-Smtp-Source: AG47ELu8bICCw5EYTqEHJu6UkCFkRjp7KvcR09TwTVlntR98Hv1FkMT05atq2+UBt+rAGnN8qGe/ X-Received: by 10.99.123.74 with SMTP id k10mr25089976pgn.217.1520618052288; Fri, 09 Mar 2018 09:54:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520618052; cv=none; d=google.com; s=arc-20160816; b=o7eTxGg5KHsAKnRhUL0XmWyRe62iwtBctCvPgwH2p92HicYDx5wFf4wtiCGiCdTknt ozfJd5qRs+mOPRuqwp9CKdI1Nnajrt0a2oWDYrzGkJqvq4W+lKKyRWIt7nIONaLg61cy 5KTyc5233O6TFCBUyGz0Q5GXTJG1mHvNCQuunwY9gf5ER+wbrg5hk2FxwTYyuZgxLi4t MAm6kevs95KegYxwSxjz85rD6NYU0a1lgxFkHXfM8XUs3JIMZVkapcZBf0JCdJogP5lQ sSvMXYXPWTsefk7lqT8cK6g/qRsww7HSFCE8wAazPXFKdycT+ePZwwu73PJKtYtgZqwN fMaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=qtCvXuW2Udq/0uje593JB7Fio09eB4b9Eg4n4JtmVQU=; b=UFM7LGRC5Nj6YpMNAemt2vHwbO5YaqaAnUUPzyQbt0PTFVhlMePPKkpT8yW0AFpfc8 IGYfRXsxwRodYLBorJ2DreXYRhViTzn0Cz8zcjFaM8dlBp2ou5UDYRBTD11RKo8ABnJj l0roAkyLHLV7oYRSaJl7QEoDc8iQraimUv9rNquHtQ8mPyPM8XYFgSNRnHbrEmiBBRE4 qgYDnvPTYkXNHNFlnBi3bqnvdmG9lB/WQTkYeS6knE4MW3UNmZDoJ2a8EebX1/XSYNFt TcVel7SOxSC7BXVBOJ751dPnad6aOy0t56otMi3m78aM2RQeNwH/BOROBA1CG96uD5eP SfDg== 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 s25si1020908pgv.479.2018.03.09.09.53.57; Fri, 09 Mar 2018 09:54:12 -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 S932567AbeCIRt7 (ORCPT + 99 others); Fri, 9 Mar 2018 12:49:59 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:46077 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932337AbeCIRt4 (ORCPT ); Fri, 9 Mar 2018 12:49:56 -0500 Received: by mail-qt0-f194.google.com with SMTP id v90so11607709qte.12; Fri, 09 Mar 2018 09:49:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qtCvXuW2Udq/0uje593JB7Fio09eB4b9Eg4n4JtmVQU=; b=KpVFs9oDKiDGWmH+CPxFTH/ZihsD55VpNQnETvnvXaOdMyBVcW+yxiuYzr64fj0vUo +IYRA38RLyAurRvaFy5ahoR88kaMM8qgG/rxfOJroWGS13mGauDeJgoejOqOQbrqjCJo vEkCaDnQy/gLYmoaJmFQ5/vqi/mJUcUEeMrAaNaxxtjY/4dPUaVMLBloLestJ+ojonhX cdYQsbS10jfykeE+zT2Rz0Nj+7sIDeUu44M6WRo/hYRsgaZ8/HUhltmn+tY/6TLVzjW2 xCgBu+31UBTo102RuetIrieqnLg/qz/5cUvz+NE5uzisFQavufJUWHNrE3RiVL/sshFm yEVA== X-Gm-Message-State: AElRT7H0XKf2cavsVt4Hla4KYdmerZFuMjQJsmm+3N26F4jHY6K9fywH oqIvTVmawQI7IDRxB1asANKQMDOz X-Received: by 10.200.40.129 with SMTP id i1mr45126398qti.176.1520617794793; Fri, 09 Mar 2018 09:49:54 -0800 (PST) Received: from localhost.localdomain ([2804:14c:138:2ada:4961:b672:c997:efad]) by smtp.gmail.com with ESMTPSA id g4sm873976qke.91.2018.03.09.09.49.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 09:49:54 -0800 (PST) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: kernel@collabora.com, Hans Verkuil , Mauro Carvalho Chehab , Shuah Khan , Pawel Osciak , Alexandre Courbot , Sakari Ailus , Brian Starkey , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: [PATCH v8 05/13] [media] v4l: add 'unordered' flag to format description ioctl Date: Fri, 9 Mar 2018 14:49:12 -0300 Message-Id: <20180309174920.22373-6-gustavo@padovan.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180309174920.22373-1-gustavo@padovan.org> References: <20180309174920.22373-1-gustavo@padovan.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gustavo Padovan For explicit synchronization it important for userspace to know if the format being used by the driver can deliver the buffers back to userspace in the same order they were queued with QBUF. Ordered streams fits nicely in a pipeline with DRM for example, where ordered buffer are expected. v2 - Improve documentation (Hans) Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 7 +++++++ include/uapi/linux/videodev2.h | 1 + 2 files changed, 8 insertions(+) diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst index 019c513df217..df8e039b9ac2 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst @@ -116,6 +116,13 @@ one until ``EINVAL`` is returned. - This format is not native to the device but emulated through software (usually libv4l2), where possible try to use a native format instead for better performance. + * - ``V4L2_FMT_FLAG_UNORDERED`` + - 0x0004 + - This format doesn't guarantee ordered buffer handling. I.e. the order + in which buffers are dequeued with + :ref:`VIDIOC_DQBUF ` may be different + from the order in which they were queued with + :ref:`VIDIOC_QBUF `. Return Value diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 982718965180..58894cfe9479 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -716,6 +716,7 @@ struct v4l2_fmtdesc { #define V4L2_FMT_FLAG_COMPRESSED 0x0001 #define V4L2_FMT_FLAG_EMULATED 0x0002 +#define V4L2_FMT_FLAG_UNORDERED 0x0004 /* Frame Size and frame rate enumeration */ /* -- 2.14.3