From patchwork Wed Jan 10 16:07:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo F. Padovan" X-Patchwork-Id: 46417 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZIyV-0001fU-9P; Wed, 10 Jan 2018 16:11:35 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966133AbeAJQKO (ORCPT + 1 other); Wed, 10 Jan 2018 11:10:14 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:41866 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966003AbeAJQKN (ORCPT ); Wed, 10 Jan 2018 11:10:13 -0500 Received: by mail-qt0-f193.google.com with SMTP id i40so22627414qti.8; Wed, 10 Jan 2018 08:10: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:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iY9LhUK16c2rcSB/wI4OKmglaoLfgXlQMOpVswjVzKI=; b=Rs2CK/Vhvsnab0EbktnxELI7TaUH+vfOciJfvGzPVblst/Fi/fSXEo+1Qooz7QyoQb Bs0x11niSidhNkfgDmHDKQPN6bFZl79yO1KzAqJxxHwHTnRnaYtdG9EuXyXNBpYk5Qnk g2BdfbJYHpp5WvqgPcB2eg8GOEmEMeyYfBXGTFdSWpEaFs7vF78GnU7dJqlaWe+x4wd5 CLyUceEhwGpxkm7jZg3nkNQdaRp04jPHANQ9fBh9wYqfY0ddEmHua/T3pDmylNjZIeBQ NLJaAQ081l7ascbzhsXpx+ykuWDwQMgBAZ44Sgv+Fj/Twu7dWoYA9DtrfJuQBAh/f5By QzJA== X-Gm-Message-State: AKwxytcrpEEGt9vudyu4MeeYIW+L2ZShQkmyXzEZBN2q7aV+2gJCz4qm LRc03hGZrtpMOqlJljx6les5jiEse9c= X-Google-Smtp-Source: ACJfBotYOuBnxtnHs4KxyQBjgugghUGoPlmd/eRx6UroJCrq3qpePERwZ/G8/TSCyw9ZOZ3/JYuOuA== X-Received: by 10.200.25.228 with SMTP id s33mr2352440qtk.57.1515600612191; Wed, 10 Jan 2018 08:10:12 -0800 (PST) Received: from localhost.localdomain ([2804:18:1033:9de::3]) by smtp.gmail.com with ESMTPSA id k3sm10470356qtj.40.2018.01.10.08.10.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2018 08:10:11 -0800 (PST) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Shuah Khan , Pawel Osciak , Alexandre Courbot , Sakari Ailus , Brian Starkey , Thierry Escande , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: [PATCH v7 2/6] [media] v4l: add 'unordered' flag to format description ioctl Date: Wed, 10 Jan 2018 14:07:28 -0200 Message-Id: <20180110160732.7722-3-gustavo@padovan.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180110160732.7722-1-gustavo@padovan.org> References: <20180110160732.7722-1-gustavo@padovan.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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. Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 3 +++ include/uapi/linux/videodev2.h | 1 + 2 files changed, 4 insertions(+) diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst index 019c513df217..368115f44fc0 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst @@ -116,6 +116,9 @@ 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 is a format that doesn't guarantee timely order of frames. 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 */ /*