1 .. SPDX-License-Identifier: GPL-2.0 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 .. _v4l2-meta-fmt-rk-isp1-stat-3a: 3 .. _v4l2-meta-fmt-rk-isp1-stat-3a: 4 4 5 ********************************************** 5 ************************************************************************************************************************ 6 V4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_ME 6 V4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s'), V4L2_META_FMT_RK_ISP1_EXT_PARAMS ('rk1e') 7 ********************************************** 7 ************************************************************************************************************************ 8 8 9 ======================== 9 ======================== 10 Configuration parameters 10 Configuration parameters 11 ======================== 11 ======================== 12 12 13 The configuration of the RkISP1 ISP is perform 13 The configuration of the RkISP1 ISP is performed by userspace by providing 14 parameters for the ISP to the driver using the 14 parameters for the ISP to the driver using the :c:type:`v4l2_meta_format` 15 interface. 15 interface. 16 16 17 There are two methods that allow to configure 17 There are two methods that allow to configure the ISP, the `fixed parameters` 18 configuration format and the `extensible param 18 configuration format and the `extensible parameters` configuration 19 format. 19 format. 20 20 21 .. _v4l2-meta-fmt-rk-isp1-params: 21 .. _v4l2-meta-fmt-rk-isp1-params: 22 22 23 Fixed parameters configuration format 23 Fixed parameters configuration format 24 ===================================== 24 ===================================== 25 25 26 When using the fixed configuration format, par 26 When using the fixed configuration format, parameters are passed to the 27 :ref:`rkisp1_params <rkisp1_params>` metadata 27 :ref:`rkisp1_params <rkisp1_params>` metadata output video node, using 28 the `V4L2_META_FMT_RK_ISP1_PARAMS` meta format 28 the `V4L2_META_FMT_RK_ISP1_PARAMS` meta format. 29 29 30 The buffer contains a single instance of the C 30 The buffer contains a single instance of the C structure 31 :c:type:`rkisp1_params_cfg` defined in ``rkisp 31 :c:type:`rkisp1_params_cfg` defined in ``rkisp1-config.h``. So the structure can 32 be obtained from the buffer by: 32 be obtained from the buffer by: 33 33 34 .. code-block:: c 34 .. code-block:: c 35 35 36 struct rkisp1_params_cfg *params = (st 36 struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer; 37 37 38 This method supports a subset of the ISP featu 38 This method supports a subset of the ISP features only, new applications should 39 use the extensible parameters method. 39 use the extensible parameters method. 40 40 41 .. _v4l2-meta-fmt-rk-isp1-ext-params: 41 .. _v4l2-meta-fmt-rk-isp1-ext-params: 42 42 43 Extensible parameters configuration format 43 Extensible parameters configuration format 44 ========================================== 44 ========================================== 45 45 46 When using the extensible configuration format 46 When using the extensible configuration format, parameters are passed to the 47 :ref:`rkisp1_params <rkisp1_params>` metadata 47 :ref:`rkisp1_params <rkisp1_params>` metadata output video node, using 48 the `V4L2_META_FMT_RK_ISP1_EXT_PARAMS` meta fo 48 the `V4L2_META_FMT_RK_ISP1_EXT_PARAMS` meta format. 49 49 50 The buffer contains a single instance of the C 50 The buffer contains a single instance of the C structure 51 :c:type:`rkisp1_ext_params_cfg` defined in ``r 51 :c:type:`rkisp1_ext_params_cfg` defined in ``rkisp1-config.h``. The 52 :c:type:`rkisp1_ext_params_cfg` structure is d 52 :c:type:`rkisp1_ext_params_cfg` structure is designed to allow userspace to 53 populate the data buffer with only the configu 53 populate the data buffer with only the configuration data for the ISP blocks it 54 intends to configure. The extensible parameter 54 intends to configure. The extensible parameters format design allows developers 55 to define new block types to support new confi 55 to define new block types to support new configuration parameters, and defines a 56 versioning scheme so that it can be extended a 56 versioning scheme so that it can be extended and versioned without breaking 57 compatibility with existing applications. 57 compatibility with existing applications. 58 58 59 For these reasons, this configuration method i 59 For these reasons, this configuration method is preferred over the `fixed 60 parameters` format alternative. 60 parameters` format alternative. 61 61 62 .. rkisp1_stat_buffer 62 .. rkisp1_stat_buffer 63 63 64 =========================== 64 =========================== 65 3A and histogram statistics 65 3A and histogram statistics 66 =========================== 66 =========================== 67 67 68 The ISP1 device collects different statistics 68 The ISP1 device collects different statistics over an input Bayer frame. 69 Those statistics are obtained from the :ref:`r 69 Those statistics are obtained from the :ref:`rkisp1_stats <rkisp1_stats>` 70 metadata capture video node, 70 metadata capture video node, 71 using the :c:type:`v4l2_meta_format` interface 71 using the :c:type:`v4l2_meta_format` interface. The buffer contains a single 72 instance of the C structure :c:type:`rkisp1_st 72 instance of the C structure :c:type:`rkisp1_stat_buffer` defined in 73 ``rkisp1-config.h``. So the structure can be o 73 ``rkisp1-config.h``. So the structure can be obtained from the buffer by: 74 74 75 .. code-block:: c 75 .. code-block:: c 76 76 77 struct rkisp1_stat_buffer *stats = (st 77 struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer; 78 78 79 The statistics collected are Exposure, AWB (Au 79 The statistics collected are Exposure, AWB (Auto-white balance), Histogram and 80 AF (Auto-focus). See :c:type:`rkisp1_stat_buff 80 AF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics. 81 81 82 The 3A statistics and configuration parameters 82 The 3A statistics and configuration parameters described here are usually 83 consumed and produced by dedicated user space 83 consumed and produced by dedicated user space libraries that comprise the 84 important tuning tools using software control 84 important tuning tools using software control loop. 85 85 86 rkisp1 uAPI data types 86 rkisp1 uAPI data types 87 ====================== 87 ====================== 88 88 89 .. kernel-doc:: include/uapi/linux/rkisp1-conf 89 .. kernel-doc:: include/uapi/linux/rkisp1-config.h
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.