162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci.. _v4l2-meta-fmt-params: 462306a36Sopenharmony_ci.. _v4l2-meta-fmt-stat-3a: 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci****************************************************************** 762306a36Sopenharmony_ciV4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s') 862306a36Sopenharmony_ci****************************************************************** 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci.. ipu3_uapi_stats_3a 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci3A statistics 1362306a36Sopenharmony_ci============= 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciThe IPU3 ImgU 3A statistics accelerators collect different statistics over 1662306a36Sopenharmony_cian input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a 1762306a36Sopenharmony_cistat" metadata capture video nodes, using the :c:type:`v4l2_meta_format` 1862306a36Sopenharmony_ciinterface. They are formatted as described by the :c:type:`ipu3_uapi_stats_3a` 1962306a36Sopenharmony_cistructure. 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciThe statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and 2262306a36Sopenharmony_ciSaturation measure) cells, AWB filter response, AF (Auto-focus) filter response, 2362306a36Sopenharmony_ciand AE (Auto-exposure) histogram. 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ciThe struct :c:type:`ipu3_uapi_4a_config` saves all configurable parameters. 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci.. code-block:: c 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci struct ipu3_uapi_stats_3a { 3062306a36Sopenharmony_ci struct ipu3_uapi_awb_raw_buffer awb_raw_buffer; 3162306a36Sopenharmony_ci struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES]; 3262306a36Sopenharmony_ci struct ipu3_uapi_af_raw_buffer af_raw_buffer; 3362306a36Sopenharmony_ci struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer; 3462306a36Sopenharmony_ci struct ipu3_uapi_4a_config stats_4a_config; 3562306a36Sopenharmony_ci __u32 ae_join_buffers; 3662306a36Sopenharmony_ci __u8 padding[28]; 3762306a36Sopenharmony_ci struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe; 3862306a36Sopenharmony_ci struct ipu3_uapi_ff_status stats_3a_status; 3962306a36Sopenharmony_ci }; 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci.. ipu3_uapi_params 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciPipeline parameters 4462306a36Sopenharmony_ci=================== 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciThe pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata 4762306a36Sopenharmony_cioutput video nodes, using the :c:type:`v4l2_meta_format` interface. They are 4862306a36Sopenharmony_ciformatted as described by the :c:type:`ipu3_uapi_params` structure. 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ciBoth 3A statistics and pipeline parameters described here are closely tied to 5162306a36Sopenharmony_cithe underlying camera sub-system (CSS) APIs. They are usually consumed and 5262306a36Sopenharmony_ciproduced by dedicated user space libraries that comprise the important tuning 5362306a36Sopenharmony_citools, thus freeing the developers from being bothered with the low level 5462306a36Sopenharmony_cihardware and algorithm details. 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci.. code-block:: c 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci struct ipu3_uapi_params { 5962306a36Sopenharmony_ci /* Flags which of the settings below are to be applied */ 6062306a36Sopenharmony_ci struct ipu3_uapi_flags use; 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci /* Accelerator cluster parameters */ 6362306a36Sopenharmony_ci struct ipu3_uapi_acc_param acc_param; 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci /* ISP vector address space parameters */ 6662306a36Sopenharmony_ci struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params; 6762306a36Sopenharmony_ci struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params; 6862306a36Sopenharmony_ci struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params; 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci /* ISP data memory (DMEM) parameters */ 7162306a36Sopenharmony_ci struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params; 7262306a36Sopenharmony_ci struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params; 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci /* Optical black level compensation */ 7562306a36Sopenharmony_ci struct ipu3_uapi_obgrid_param obgrid_param; 7662306a36Sopenharmony_ci }; 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ciIntel IPU3 ImgU uAPI data types 7962306a36Sopenharmony_ci=============================== 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci.. kernel-doc:: drivers/staging/media/ipu3/include/uapi/intel-ipu3.h 82