Received: by 10.192.165.148 with SMTP id m20csp463536imm; Fri, 4 May 2018 13:12:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrd+7MQYCl5Ja8/v3QwLe0DCnE+L0B9BgQX9MVQxlevkywwB5czqqmTGyKWAGZ/X/Iy7wPH X-Received: by 2002:a63:7b55:: with SMTP id k21-v6mr23802794pgn.364.1525464737240; Fri, 04 May 2018 13:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525464737; cv=none; d=google.com; s=arc-20160816; b=W9SoTL6u5kwuqgByO1/XoyApreSJ90ce6i7jFhqsPWCSptZR+QYBe2rH7rodXTdIsF wlEopRli7VWTn+CJXvXYC7UF+RFwZlkN9ijeFfdJGzwXi8EpxwZo191wQlUR4D7vkU1v /b0MqiESOqYMQuZ+XIlzX6zKE48ki45u3bpnWNXcad4dVehtu7mChH64u+RrPHL43Qmv wJZBh4IdIsxKf8eM8asXszUCMV0liKPsNu4JGPWWMFuWtOk7RL+h2u4/E3oso+7N3bWw clAfkbev6i5zpN89AfLADrrcH5kdXK3thfdpw7M4u74qkS0rmWkyZCF9HGT8vRZSIhlM HNxA== 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=E9Vc3imzq6AiFkrS081Vbbfbxt38wGDoi+n1m/NfSBlAZ9DDUGweToQ/dcm9I/oOtS g7EBsPEUdjYi/FuNMxvgD+8pfuENd0JVHA5cE4reCCbnbtS/gdqHMLsqPektS9bADDDT qWA9EiQFlCIiPAnxjclfrv4eko+gvpSVGxykls8/+m5b2xdxeT8Ea6AkOcVGAE5eYKea rKU7+QAl7V0dXKceS7z+2okxLBivmaMOI+HBhHkQWN5KBFZD2b/zUCEaMUO83uT7wQZ1 a/gpav8TRrlD5cEDM4pkNgMeX/gWtEyzZ5JTKaUMFqhbqEkMkDCdZj+s/Z2xMS0V1KUR pFXg== 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 o63-v6si13625174pga.584.2018.05.04.13.12.02; Fri, 04 May 2018 13:12:17 -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 S1751982AbeEDUIH (ORCPT + 99 others); Fri, 4 May 2018 16:08:07 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:54036 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbeEDUID (ORCPT ); Fri, 4 May 2018 16:08:03 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 80D3B286551 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 v9 06/15] v4l: add unordered flag to format description ioctl Date: Fri, 4 May 2018 17:06:03 -0300 Message-Id: <20180504200612.8763-7-ezequiel@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180504200612.8763-1-ezequiel@collabora.com> References: <20180504200612.8763-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