Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: cec: document CEC_ADAP_G_CONNECTOR_INFO and capability

Document the new CEC_ADAP_G_CONNECTOR_INFO ioctl and the new
CEC_CAP_CONNECTOR_INFO capability.

Co-developed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Signed-off-by: Dariusz Marcinkiewicz <darekm@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: added CEC_CAP_CONNECTOR_INFO]
[hverkuil-cisco@xs4all.nl: added DQEVENT have_conn_info]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Dariusz Marcinkiewicz and committed by
Mauro Carvalho Chehab
98f29073 9098c1c2

+119 -1
+1
Documentation/media/uapi/cec/cec-funcs.rst
··· 24 24 cec-ioc-adap-g-caps 25 25 cec-ioc-adap-g-log-addrs 26 26 cec-ioc-adap-g-phys-addr 27 + cec-ioc-adap-g-conn-info 27 28 cec-ioc-dqevent 28 29 cec-ioc-g-mode 29 30 cec-ioc-receive
+5 -1
Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst
··· 135 135 - The CEC hardware can monitor CEC pin changes from low to high voltage 136 136 and vice versa. When in pin monitoring mode the application will 137 137 receive ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events. 138 + * .. _`CEC-CAP-CONNECTOR-INFO`: 138 139 139 - 140 + - ``CEC_CAP_CONNECTOR_INFO`` 141 + - 0x00000100 142 + - If this capability is set, then :ref:`CEC_ADAP_G_CONNECTOR_INFO` can 143 + be used. 140 144 141 145 Return Value 142 146 ============
+105
Documentation/media/uapi/cec/cec-ioc-adap-g-conn-info.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + .. 3 + .. Copyright 2019 Google LLC 4 + .. 5 + .. _CEC_ADAP_G_CONNECTOR_INFO: 6 + 7 + ******************************* 8 + ioctl CEC_ADAP_G_CONNECTOR_INFO 9 + ******************************* 10 + 11 + Name 12 + ==== 13 + 14 + CEC_ADAP_G_CONNECTOR_INFO - Query HDMI connector information 15 + 16 + Synopsis 17 + ======== 18 + 19 + .. c:function:: int ioctl( int fd, CEC_ADAP_G_CONNECTOR_INFO, struct cec_connector_info *argp ) 20 + :name: CEC_ADAP_G_CONNECTOR_INFO 21 + 22 + Arguments 23 + ========= 24 + 25 + ``fd`` 26 + File descriptor returned by :c:func:`open() <cec-open>`. 27 + 28 + ``argp`` 29 + 30 + 31 + Description 32 + =========== 33 + 34 + Using this ioctl an application can learn which HDMI connector this CEC 35 + device corresponds to. While calling this ioctl the application should 36 + provide a pointer to a cec_connector_info struct which will be populated 37 + by the kernel with the info provided by the adapter's driver. This ioctl 38 + is only available if the ``CEC_CAP_CONNECTOR_INFO`` capability is set. 39 + 40 + .. tabularcolumns:: |p{1.0cm}|p{4.4cm}|p{2.5cm}|p{9.6cm}| 41 + 42 + .. c:type:: cec_connector_info 43 + 44 + .. flat-table:: struct cec_connector_info 45 + :header-rows: 0 46 + :stub-columns: 0 47 + :widths: 1 1 1 8 48 + 49 + * - __u32 50 + - ``type`` 51 + - The type of connector this adapter is associated with. 52 + * - union 53 + - ``(anonymous)`` 54 + - 55 + * - 56 + - ``struct cec_drm_connector_info`` 57 + - drm 58 + - :ref:`cec-drm-connector-info` 59 + 60 + 61 + .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| 62 + 63 + .. _connector-type: 64 + 65 + .. flat-table:: Connector types 66 + :header-rows: 0 67 + :stub-columns: 0 68 + :widths: 3 1 8 69 + 70 + * .. _`CEC-CONNECTOR-TYPE-NO-CONNECTOR`: 71 + 72 + - ``CEC_CONNECTOR_TYPE_NO_CONNECTOR`` 73 + - 0 74 + - No connector is associated with the adapter/the information is not 75 + provided by the driver. 76 + * .. _`CEC-CONNECTOR-TYPE-DRM`: 77 + 78 + - ``CEC_CONNECTOR_TYPE_DRM`` 79 + - 1 80 + - Indicates that a DRM connector is associated with this adapter. 81 + Information about the connector can be found in 82 + :ref:`cec-drm-connector-info`. 83 + 84 + .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| 85 + 86 + .. c:type:: cec_drm_connector_info 87 + 88 + .. _cec-drm-connector-info: 89 + 90 + .. flat-table:: struct cec_drm_connector_info 91 + :header-rows: 0 92 + :stub-columns: 0 93 + :widths: 3 1 8 94 + 95 + * .. _`CEC-DRM-CONNECTOR-TYPE-CARD-NO`: 96 + 97 + - __u32 98 + - ``card_no`` 99 + - DRM card number: the number from a card's path, e.g. 0 in case of 100 + /dev/card0. 101 + * .. _`CEC-DRM-CONNECTOR-TYPE-CONNECTOR_ID`: 102 + 103 + - __u32 104 + - ``connector_id`` 105 + - DRM connector ID.
+8
Documentation/media/uapi/cec/cec-ioc-dqevent.rst
··· 70 70 addresses are claimed or if ``phys_addr`` is ``CEC_PHYS_ADDR_INVALID``. 71 71 If bit 15 is set (``1 << CEC_LOG_ADDR_UNREGISTERED``) then this device 72 72 has the unregistered logical address. In that case all other bits are 0. 73 + * - __u16 74 + - ``have_conn_info`` 75 + - If non-zero, then HDMI connector information is available. 76 + This field is only valid if ``CEC_CAP_CONNECTOR_INFO`` is set. If that 77 + capability is set and ``have_conn_info`` is zero, then that indicates 78 + that the HDMI connector device is not instantiated, either because 79 + the HDMI driver is still configuring the device or because the HDMI 80 + device was unbound. 73 81 74 82 75 83 .. c:type:: cec_event_lost_msgs