Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp543698imm; Mon, 21 May 2018 10:05:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoyO0QP6FEdVQE1G0W1juz7rKtP8yOTu5Y2FrjNdzXENEGJDrKtiKkzpnOW9LKIT7cN2p5w X-Received: by 2002:a17:902:8218:: with SMTP id x24-v6mr21177096pln.57.1526922316970; Mon, 21 May 2018 10:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526922316; cv=none; d=google.com; s=arc-20160816; b=XqDhfRBi0ejYswo6/q2kIJbHASFUzg9pSzlxTu6nY8vyKM9gkxopyjN+T5qetFdQsy yZ5gvDXm8Pqf7reKdjowxKK2tzQGGdWzYpb1D1jCT61TTZLl8Tw9OLDNw+Y1Zs+HTrAx jllKkyeNpWAIdbzvWv97RWDj5fPxRfgrNujrZllc+nPPf9OhRJnGalKWnKsw41i1R5l9 Qel7BTuupyz8OMyed1R1G0plRi153zDaqf3CwxdMbLSqmimZ6Ccz/N/kiN7O8rk+gq6a 1Bj/cIk0oe1deOvHoWaLNdDJgBfnvNP9mkdF+m9RWkjjJihlUxMQ3Z6LuPN26T+9PLHL LAfg== 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=Wx1d8UaDZFxFH8EE/mRAlEzL8mT3NsINkFYS9Lkb3tM=; b=jR+vc3bRGrTuNcBa1DhvyM+cWkYxZXcjQzx4mXDL73aDiZ0fY7GcWOfaVGGsC+3838 4e8L6OyEzD8fg8AkLSpnZctUWgurcLnV2Lsr52cuU6iAokJxaXiVDKug/kkPP00tMaUc e82eF9EgAmTpkX7sSXYQSvl9eYqV5kYm/ooI95hvALWop52W79FMKnRPLtlWXf7M0w1t v0jngtQuAPYMkYhR2DxF7t1NEADdn4ZJjXmDCY3Y+on2u8Kzt4/PsKWnalC/NaFGR3Tq bQjORl2Y3/+3XnVx3p/iuIvtKB6KPaukgzG6ykcfFMFi7aUF35mbCiVAY2Cz5TybaSC+ aEAg== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b77-v6si14641385pfc.320.2018.05.21.10.05.02; Mon, 21 May 2018 10:05:16 -0700 (PDT) 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753362AbeEURCB (ORCPT + 99 others); Mon, 21 May 2018 13:02:01 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44364 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082AbeEURB5 (ORCPT ); Mon, 21 May 2018 13:01:57 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 10F4A2730E1 From: Ezequiel Garcia 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 , Ezequiel Garcia Subject: [PATCH v10 07/16] v4l: add unordered flag to format description ioctl Date: Mon, 21 May 2018 13:59:37 -0300 Message-Id: <20180521165946.11778-8-ezequiel@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180521165946.11778-1-ezequiel@collabora.com> References: <20180521165946.11778-1-ezequiel@collabora.com> 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 600877be5c22..a8842a5ca636 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -717,6 +717,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.16.3