From patchwork Mon May 21 16:59:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 49781 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 1fKoCf-0005ta-E6; Mon, 21 May 2018 17:02:33 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753440AbeEURCb (ORCPT + 1 other); Mon, 21 May 2018 13:02:31 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44464 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753031AbeEURCZ (ORCPT ); Mon, 21 May 2018 13:02:25 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id ECDD92730E1 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 14/16] v4l: introduce the fences capability Date: Mon, 21 May 2018 13:59:44 -0300 Message-Id: <20180521165946.11778-15-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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Gustavo Padovan Drivers capable of using fences (vb2 drivers) should report the V4L2_CAP_FENCES to userspace, so add this flag to the uapi. v2: minor doc/english fix (Hans Verkuil) 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..df3ad57f07a3 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_FENCES`` + - 0x20000000 + - The device supports explicit synchronization. * - ``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 1f18dc68ecab..cab35fca7c7f 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -460,6 +460,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_FENCES 0x20000000 /* Supports explicit synchronization */ #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */