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

Configure Feed

Select the types of activity you want to include in your feed.

Documentation: media: mali-c55: Document the mali-c55 parameter setting

Document the mali-c55 parameter setting by expanding the relevant
pages in both admin-guide/ and userspace-api/.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Nayden Kanchev <nayden.kanchev@arm.com>
Co-developed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Daniel Scally and committed by
Hans Verkuil
87b214dd 01535ea0

+75 -5
+17 -2
Documentation/admin-guide/media/mali-c55.rst
··· 387 387 +-------------+ | +-------------+ 388 388 +--> AWB-1 389 389 390 - At present all statistics are drawn from the 0th tap point for each algorithm; 390 + By default all statistics are drawn from the 0th tap point for each algorithm; 391 391 I.E. AEXP statistics from AEXP-0 (A), AWB statistics from AWB-0 and AF 392 - statistics from AF-0. In the future this will be configurable. 392 + statistics from AF-0. This is configurable for AEXP and AWB statsistics through 393 + programming the ISP's parameters. 394 + 395 + .. _mali-c55-3a-params: 396 + 397 + Programming ISP Parameters 398 + ========================== 399 + 400 + The ISP can be programmed with various parameters from userspace to apply to the 401 + hardware before and during video stream. This allows userspace to dynamically 402 + change values such as black level, white balance and lens shading gains and so 403 + on. 404 + 405 + The buffer format and how to populate it are described by the 406 + :ref:`V4L2_META_FMT_MALI_C55_PARAMS <v4l2-meta-fmt-mali-c55-params>` format, 407 + which should be set as the data format for the `mali-c55 3a params` video node. 393 408 394 409 References 395 410 ==========
+58 -3
Documentation/userspace-api/media/v4l/metafmt-arm-mali-c55.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 + .. _v4l2-meta-fmt-mali-c55-params: 3 4 .. _v4l2-meta-fmt-mali-c55-stats: 4 5 5 - ************************************* 6 - V4L2_META_FMT_MALI_C55_STATS ('C55S') 7 - ************************************* 6 + ***************************************************************************** 7 + V4L2_META_FMT_MALI_C55_STATS ('C55S'), V4L2_META_FMT_MALI_C55_PARAMS ('C55P') 8 + ***************************************************************************** 8 9 9 10 3A Statistics 10 11 ============= ··· 23 22 (struct mali_c55_stats_buffer *)buf; 24 23 25 24 For details of the statistics see :c:type:`mali_c55_stats_buffer`. 25 + 26 + Configuration Parameters 27 + ======================== 28 + 29 + The configuration parameters are passed to the :ref:`mali-c55 3a params 30 + <mali-c55-3a-params>` metadata output video node, using the 31 + :c:type:`v4l2_meta_format` interface. Rather than a single struct containing 32 + sub-structs for each configurable area of the ISP, parameters for the Mali-C55 33 + use the v4l2-isp parameters system, through which groups of parameters are 34 + defined as distinct structs or "blocks" which may be added to the data member of 35 + :c:type:`v4l2_isp_params_buffer`. Userspace is responsible for populating the 36 + data member with the blocks that need to be configured by the driver. Each 37 + block-specific struct embeds :c:type:`v4l2_isp_params_block_header` as its first 38 + member and userspace must populate the type member with a value from 39 + :c:type:`mali_c55_param_block_type`. 40 + 41 + .. code-block:: c 42 + 43 + struct v4l2_isp_params_buffer *params = 44 + (struct v4l2_isp_params_buffer *)buffer; 45 + 46 + params->version = MALI_C55_PARAM_BUFFER_V1; 47 + params->data_size = 0; 48 + 49 + void *data = (void *)params->data; 50 + 51 + struct mali_c55_params_awb_gains *gains = 52 + (struct mali_c55_params_awb_gains *)data; 53 + 54 + gains->header.type = MALI_C55_PARAM_BLOCK_AWB_GAINS; 55 + gains->header.flags |= V4L2_ISP_PARAMS_FL_BLOCK_ENABLE; 56 + gains->header.size = sizeof(struct mali_c55_params_awb_gains); 57 + 58 + gains->gain00 = 256; 59 + gains->gain00 = 256; 60 + gains->gain00 = 256; 61 + gains->gain00 = 256; 62 + 63 + data += sizeof(struct mali_c55_params_awb_gains); 64 + params->data_size += sizeof(struct mali_c55_params_awb_gains); 65 + 66 + struct mali_c55_params_sensor_off_preshading *blc = 67 + (struct mali_c55_params_sensor_off_preshading *)data; 68 + 69 + blc->header.type = MALI_C55_PARAM_BLOCK_SENSOR_OFFS; 70 + blc->header.flags |= V4L2_ISP_PARAMS_FL_BLOCK_ENABLE; 71 + blc->header.size = sizeof(struct mali_c55_params_sensor_off_preshading); 72 + 73 + blc->chan00 = 51200; 74 + blc->chan01 = 51200; 75 + blc->chan10 = 51200; 76 + blc->chan11 = 51200; 77 + 78 + params->data_size += sizeof(struct mali_c55_params_sensor_off_preshading); 26 79 27 80 Arm Mali-C55 uAPI data types 28 81 ============================