From patchwork Mon Jun 24 16:03:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 11014861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0227D14BB for ; Tue, 25 Jun 2019 07:28:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E277228AD9 for ; Tue, 25 Jun 2019 07:28:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D72DF28AF7; Tue, 25 Jun 2019 07:28:31 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7868228AD9 for ; Tue, 25 Jun 2019 07:28:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E5FC6E048; Tue, 25 Jun 2019 07:27:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lb2-smtp-cloud7.xs4all.net (lb2-smtp-cloud7.xs4all.net [194.109.24.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 604D589CD7 for ; Mon, 24 Jun 2019 16:10:47 +0000 (UTC) Received: from tschai.fritz.box ([46.9.252.75]) by smtp-cloud7.xs4all.net with ESMTPA id fRRKhHRxHF85OfRRShZab5; Mon, 24 Jun 2019 18:03:38 +0200 From: Hans Verkuil To: linux-media@vger.kernel.org Subject: [PATCHv8 05/13] cec: document CEC_ADAP_G_CONNECTOR_INFO Date: Mon, 24 Jun 2019 18:03:22 +0200 Message-Id: <20190624160330.38048-6-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190624160330.38048-1-hverkuil-cisco@xs4all.nl> References: <20190624160330.38048-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfJHC8gnzmC6VsiHnhAT8Mnidw5ZU62gn3HZHqKNX7UVaXyuhfnr8nar7qUT3qlGmLsDkHKBOJjxOpQkAxPvSMU3uLSYaB+Wh29+IGNwTHaGSotCleMaH jydz2acYQRgsFtg5uESRnzo2+IhsZuls1iSK2+Qfkk2rRICKaq20ln8sxj5KvqE5TGegRK8uzBLdcF1HlbC6OaX8lMJjgnGzWc0jjfkuWs4X7YDCfmEum+4X EcZCyIsFh8k2xFRLcU5Gc0W61YkPGvB1b8ApD3uhy0omGT08+E7McH1Hf2S5Ig/VzyXS/OrQ4ZvogWElIONKW9fR0hITkbJmUhYwMOL6l1o= X-Mailman-Approved-At: Tue, 25 Jun 2019 07:27:07 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Verkuil , Dariusz Marcinkiewicz , dri-devel@lists.freedesktop.org, Cheng-yi Chiang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Document the new CEC_ADAP_G_CONNECTOR_INFO ioctl. Signed-off-by: Hans Verkuil --- Documentation/media/uapi/cec/cec-funcs.rst | 1 + .../uapi/cec/cec-ioc-adap-g-conn-info.rst | 109 ++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 Documentation/media/uapi/cec/cec-ioc-adap-g-conn-info.rst diff --git a/Documentation/media/uapi/cec/cec-funcs.rst b/Documentation/media/uapi/cec/cec-funcs.rst index 620590b168c9..dc6da9c639a8 100644 --- a/Documentation/media/uapi/cec/cec-funcs.rst +++ b/Documentation/media/uapi/cec/cec-funcs.rst @@ -24,6 +24,7 @@ Function Reference cec-ioc-adap-g-caps cec-ioc-adap-g-log-addrs cec-ioc-adap-g-phys-addr + cec-ioc-adap-g-conn-info cec-ioc-dqevent cec-ioc-g-mode cec-ioc-receive diff --git a/Documentation/media/uapi/cec/cec-ioc-adap-g-conn-info.rst b/Documentation/media/uapi/cec/cec-ioc-adap-g-conn-info.rst new file mode 100644 index 000000000000..87f475d7dfed --- /dev/null +++ b/Documentation/media/uapi/cec/cec-ioc-adap-g-conn-info.rst @@ -0,0 +1,109 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. +.. Copyright 2019 Google LLC +.. +.. This documentation is free software; you can redistribute it and/or +.. modify it under the terms of the GNU General Public License +.. version 2 as published by the Free Software Foundation. +.. +.. This documentation is distributed in the hope that it will be useful, +.. but WITHOUT ANY WARRANTY; without even the implied warranty of +.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. GNU General Public License for more details. +.. +.. _CEC_ADAP_G_CONNECTOR_INFO: + +******************************* +ioctl CEC_ADAP_G_CONNECTOR_INFO +******************************* + +Name +==== + +CEC_ADAP_G_CONNECTOR_INFO - Query HDMI connector information + +Synopsis +======== + +.. c:function:: int ioctl( int fd, CEC_ADAP_G_CONNECTOR_INFO, struct cec_connector_info *argp ) + :name: CEC_ADAP_G_CONNECTOR_INFO + +Arguments +========= + +``fd`` + File descriptor returned by :c:func:`open() `. + +``argp`` + + +Description +=========== + +Using this ioctl an application can learn which HDMI connector this CEC +device corresponds to. While calling this ioctl the application should +provide pointer to a cec_connector_info struct which will be populated +by the kernel with the info provided by the adapter's driver. Not all +drivers supply this information. + +.. tabularcolumns:: |p{1.0cm}|p{4.4cm}|p{2.5cm}|p{9.6cm}| + +.. c:type:: cec_connector_info + +.. flat-table:: struct cec_connector_info + :header-rows: 0 + :stub-columns: 0 + :widths: 1 1 1 8 + + * - __u32 + - ``type`` + - The type of connector this adapter is associated with. + * - union + - ``(anonymous)`` + - + * - + - ``struct cec_drm_connector_info`` + - drm + - :ref:`cec-drm-connector-info`. + + +.. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| + +.. _connector-type: + +.. flat-table:: Connector types + :header-rows: 0 + :stub-columns: 0 + :widths: 3 1 8 + + * .. _`CEC-CONNECTOR-TYPE-NO-CONNECTOR`: + + - ``CEC_CONNECTOR_TYPE_NO_CONNECTOR`` + - 0 + - No connector is associated with the adapter/the information is not provided by the driver. + * .. _`CEC-CONNECTOR-TYPE-DRM`: + + - ``CEC_CONNECTOR_TYPE_DRM`` + - 1 + - Indicates that a DRM connector is associated with this adapter. Info about the + connector can be found in :ref:`cec-drm-connector-info`. + +.. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| + +.. c:type:: cec_drm_connector_info + +.. _cec-drm-connector-info: + +.. flat-table:: struct cec_drm_connector_info + :header-rows: 0 + :stub-columns: 0 + :widths: 3 1 8 + + * .. _`CEC-DRM-CONNECTOR-TYPE-CARD-NO`: + + - __u32 + - ``card_no`` + - DRM card number - the digit from a card's path, e.g. 0 in case of /dev/card0. + * .. _`CEC-DRM-CONNECTOR-TYPE-CONNECTOR_ID`: + + - __u32