From patchwork Fri May 4 20:06:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10381609 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB31660353 for ; Fri, 4 May 2018 20:10:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4D68295BB for ; Fri, 4 May 2018 20:10:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6F1F295CC; Fri, 4 May 2018 20:10:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 589F4295C3 for ; Fri, 4 May 2018 20:10:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbeEDUJz (ORCPT ); Fri, 4 May 2018 16:09:55 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:54138 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068AbeEDUIa (ORCPT ); Fri, 4 May 2018 16:08:30 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id F38D7286550 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 13/15] v4l: introduce the fences capability Date: Fri, 4 May 2018 17:06:10 -0300 Message-Id: <20180504200612.8763-14-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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 */