From patchwork Mon Dec 11 18:27:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo F. Padovan" X-Patchwork-Id: 45896 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 1eOSoF-0001F1-R1; Mon, 11 Dec 2017 18:28:12 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbdLKS2H (ORCPT + 1 other); Mon, 11 Dec 2017 13:28:07 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:35507 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbdLKS2D (ORCPT ); Mon, 11 Dec 2017 13:28:03 -0500 Received: by mail-qt0-f193.google.com with SMTP id u10so41006531qtg.2; Mon, 11 Dec 2017 10:28:03 -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=2a4+Q7DaShsWiRmdl4QeLJCYEauvoZiL3MIhMzRzrcM=; b=OuLtkIUjUiuNuEmW6X9iSAGznhlgliqwwF7WYsHgVyu1s3sLQKSd/PrgPLQVqMolJK ERTiETQkPV/HI4duEOn+T0m2b6Eljo4ihuhoA6wTGJ8KpEgPc77uvzbOnQJa/EKxNTDe jNx2nsUiXVQ0hzSvFRLsKdL37D+Pdu8dV85KStaJhdmrqgIJAkBfvPLeTETzGaXJo/PO 839U6r2AXx4hdXVEHzLSrlUMnN8N+ccRKXq++EMPp+0YM3hIOArA9MzrYMObTe3FvdNL yaGuaHhUzdTbeRUcusPTEU2Z5BE1wDU16ejAC5+6cFO6cHhUpLWw2DJ1B7+wudFNj9pN /Jxw== X-Gm-Message-State: AKGB3mJpdMREpfZuYzmMHKzEOZnp5Qy6/kWkRaVm1zzvX8lfc69PYn1Z Z7hITnhaeqEGKyahsmQqPVupY6Cc X-Google-Smtp-Source: ACJfBosCH4nZd2EmlLX0fiBgUmyOQxIshbUgj3UsyM/pV9lDEgcTFiRCn2l88Wf39jAvzdmiqa7BVQ== X-Received: by 10.55.183.132 with SMTP id h126mr1737672qkf.259.1513016882383; Mon, 11 Dec 2017 10:28:02 -0800 (PST) Received: from localhost.localdomain ([177.68.185.72]) by smtp.gmail.com with ESMTPSA id v129sm4547126qkd.42.2017.12.11.10.27.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2017 10:28:01 -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 v6 2/6] [media] v4l: add 'unordered' flag to format description ioctl Date: Mon, 11 Dec 2017 16:27:37 -0200 Message-Id: <20171211182741.29712-3-gustavo@padovan.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171211182741.29712-1-gustavo@padovan.org> References: <20171211182741.29712-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 1c095b5a99c5..a8ea632c14f0 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -709,6 +709,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 */ /*