From patchwork Wed Nov 15 17:10:47 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: 45470 Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF1Fc-0006w4-G0; Wed, 15 Nov 2017 17:13:24 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933349AbdKORL6 (ORCPT + 1 other); Wed, 15 Nov 2017 12:11:58 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:56284 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933264AbdKORLK (ORCPT ); Wed, 15 Nov 2017 12:11:10 -0500 Received: by mail-qt0-f193.google.com with SMTP id v41so35944176qtv.12; Wed, 15 Nov 2017 09:11:09 -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=ZViRCQ0kNU0Z+7nJnKQQMm2GhuwtvQ0dIskUA+hwiOE=; b=BKzFGuUyeyw5BUQMfSICMcitasmUABpeUd1R3uzMCZubc8B+spy+PFgZnX8jCOJXUX zwOb5+gqfOJsJRVv52Ctw0owOeCFC+DCKmhjHyls7gWr++05GxX4/m/DF06m4SxX1bDK quU9276Vuau/ho1UGR2CvOXwA9j3EoWpWh8Xank3FCKVgktFZTEc3XHbUL0tqVAt4rNh 8A0B5NHNhMVNe/iXWDIk/nzRBNHqlGlxusJSysGp9AZtIdrV9/vcIoeZRX4T2avIv1ix aSfQQCac+QcNvH3fcv0xjI+4EXdrCjdNJxivAcGONc20JNVyRQTq6RmezYb1kwJEbSLh Kl6Q== X-Gm-Message-State: AJaThX6xLw7OM9KccnaajB727MBUG7NVH9IjIqg3vPTWErjXmGjvYM81 /HQdGkc0EN/Uby5aJaQXrA3+GgT/ X-Google-Smtp-Source: AGs4zMZWvOlY4ww/XFy6vkEdT1OQZ6JxOODT1dSh6kr+djsIpwx0jeKZ97HlXaw12lBwC6tBAUDEGQ== X-Received: by 10.55.214.91 with SMTP id t88mr5686728qki.274.1510765868876; Wed, 15 Nov 2017 09:11:08 -0800 (PST) Received: from localhost.localdomain ([179.110.36.75]) by smtp.gmail.com with ESMTPSA id p85sm15211633qkp.94.2017.11.15.09.11.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Nov 2017 09:11:08 -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: [RFC v5 01/11] [media] v4l: add V4L2_CAP_ORDERED to the uapi Date: Wed, 15 Nov 2017 15:10:47 -0200 Message-Id: <20171115171057.17340-2-gustavo@padovan.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171115171057.17340-1-gustavo@padovan.org> References: <20171115171057.17340-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 When using explicit synchronization userspace needs to know if the queue can deliver everything back in the same order, so we added a new capability that drivers can use to report that they are capable of keeping ordering. In videobuf2 core when using fences we also make sure to keep the ordering of buffers, so if the driver guarantees it too the whole pipeline inside V4L2 will be ordered and the V4L2_CAP_ORDERED should be used. Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l/vidioc-querycap.rst | 3 +++ include/uapi/linux/videodev2.h | 1 + 2 files changed, 4 insertions(+) diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst b/Documentation/media/uapi/v4l/vidioc-querycap.rst index 66fb1b3d6e6e..ed3daa814da9 100644 --- a/Documentation/media/uapi/v4l/vidioc-querycap.rst +++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst @@ -254,6 +254,9 @@ specification the ioctl returns an ``EINVAL`` error code. * - ``V4L2_CAP_TOUCH`` - 0x10000000 - This is a touch device. + * - ``V4L2_CAP_ORDERED`` + - 0x20000000 + - The device queue is ordered. * - ``V4L2_CAP_DEVICE_CAPS`` - 0x80000000 - The driver fills the ``device_caps`` field. This capability can diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 185d6a0acc06..cd6fc1387f47 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -459,6 +459,7 @@ struct v4l2_capability { #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ #define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */ +#define V4L2_CAP_ORDERED 0x20000000 /* Is the device queue ordered */ #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */