From patchwork Fri Mar 9 17:49:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 10271461 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 1B0AC603B5 for ; Fri, 9 Mar 2018 17:51:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0878729973 for ; Fri, 9 Mar 2018 17:51:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F05BA29D74; Fri, 9 Mar 2018 17:51:23 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 7F51429973 for ; Fri, 9 Mar 2018 17:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932656AbeCIRuV (ORCPT ); Fri, 9 Mar 2018 12:50:21 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:38034 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932645AbeCIRuS (ORCPT ); Fri, 9 Mar 2018 12:50:18 -0500 Received: by mail-qk0-f196.google.com with SMTP id s198so4599499qke.5; Fri, 09 Mar 2018 09:50:17 -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=FFIm1FrKfdrZp8wJhJOIj9KyMtp0CM7S4EG1QfjGkU8=; b=G6HUsFe4LHLKviIIW7+KKlXOx4PyiuyIysaODjJ35Ls+Ofi+iLL2M5rgULlJTi+13o TQ9p4Mq7i5GZETleUwu/fMe4CR3MRAPANpQpE5vpe758SObwK6AlDBhsVzPJIChQZ+pE M4WVCg6g6Cdxm6GRWzAorzZya4B3EJz1LAiamcf49UL26WnkAO6ZOcqjchNEF5uG/ojB BIUdm+f88XQSINbrfu4tGeflTAC2IjzOiZaq8h3HfUIDUVwrIukLY/4KL+QvOOAMHSEy 7iWrLnoHf/9xz2xSyaY50b5Cyq2E+Dyb8mvB/flpANHxpzYVkl3wpHmetGGM9Ih2eJqa bBGg== X-Gm-Message-State: AElRT7GbhT6ekZXsrI83drBYQU4TY9cabV8g/bhqD5OFTYDlFCOe2Azz kJdBxCtk8S4OqJZ0hGg5TthSe4To X-Google-Smtp-Source: AG47ELudybNyC2qF4q/B7QKLGzOAi5GvN8q6U9OJrCYOEydTMeWhYoC+AkW2LJcaRh2p//5Ed+Lcyw== X-Received: by 10.55.168.212 with SMTP id r203mr43929966qke.257.1520617816713; Fri, 09 Mar 2018 09:50:16 -0800 (PST) Received: from localhost.localdomain ([2804:14c:138:2ada:4961:b672:c997:efad]) by smtp.gmail.com with ESMTPSA id g4sm873976qke.91.2018.03.09.09.50.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 09:50:16 -0800 (PST) From: Gustavo Padovan 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 Subject: [PATCH v8 11/13] [media] v4l: introduce the fences capability Date: Fri, 9 Mar 2018 14:49:18 -0300 Message-Id: <20180309174920.22373-12-gustavo@padovan.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180309174920.22373-1-gustavo@padovan.org> References: <20180309174920.22373-1-gustavo@padovan.org> 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. 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..414016065309 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 support 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 2d424aebdd1e..db58204e346e 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 */