18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. _v4l2-meta-fmt-params:
48c2ecf20Sopenharmony_ci.. _v4l2-meta-fmt-stat-3a:
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci******************************************************************
78c2ecf20Sopenharmony_ciV4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s')
88c2ecf20Sopenharmony_ci******************************************************************
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci.. ipu3_uapi_stats_3a
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci3A statistics
138c2ecf20Sopenharmony_ci=============
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciThe IPU3 ImgU 3A statistics accelerators collect different statistics over
168c2ecf20Sopenharmony_cian input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a
178c2ecf20Sopenharmony_cistat" metadata capture video nodes, using the :c:type:`v4l2_meta_format`
188c2ecf20Sopenharmony_ciinterface. They are formatted as described by the :c:type:`ipu3_uapi_stats_3a`
198c2ecf20Sopenharmony_cistructure.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciThe statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and
228c2ecf20Sopenharmony_ciSaturation measure) cells, AWB filter response, AF (Auto-focus) filter response,
238c2ecf20Sopenharmony_ciand AE (Auto-exposure) histogram.
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciThe struct :c:type:`ipu3_uapi_4a_config` saves all configurable parameters.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci.. code-block:: c
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci	struct ipu3_uapi_stats_3a {
308c2ecf20Sopenharmony_ci		struct ipu3_uapi_awb_raw_buffer awb_raw_buffer;
318c2ecf20Sopenharmony_ci		struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES];
328c2ecf20Sopenharmony_ci		struct ipu3_uapi_af_raw_buffer af_raw_buffer;
338c2ecf20Sopenharmony_ci		struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer;
348c2ecf20Sopenharmony_ci		struct ipu3_uapi_4a_config stats_4a_config;
358c2ecf20Sopenharmony_ci		__u32 ae_join_buffers;
368c2ecf20Sopenharmony_ci		__u8 padding[28];
378c2ecf20Sopenharmony_ci		struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe;
388c2ecf20Sopenharmony_ci		struct ipu3_uapi_ff_status stats_3a_status;
398c2ecf20Sopenharmony_ci	};
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci.. ipu3_uapi_params
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciPipeline parameters
448c2ecf20Sopenharmony_ci===================
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ciThe pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata
478c2ecf20Sopenharmony_cioutput video nodes, using the :c:type:`v4l2_meta_format` interface. They are
488c2ecf20Sopenharmony_ciformatted as described by the :c:type:`ipu3_uapi_params` structure.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciBoth 3A statistics and pipeline parameters described here are closely tied to
518c2ecf20Sopenharmony_cithe underlying camera sub-system (CSS) APIs. They are usually consumed and
528c2ecf20Sopenharmony_ciproduced by dedicated user space libraries that comprise the important tuning
538c2ecf20Sopenharmony_citools, thus freeing the developers from being bothered with the low level
548c2ecf20Sopenharmony_cihardware and algorithm details.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci.. code-block:: c
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci	struct ipu3_uapi_params {
598c2ecf20Sopenharmony_ci		/* Flags which of the settings below are to be applied */
608c2ecf20Sopenharmony_ci		struct ipu3_uapi_flags use;
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci		/* Accelerator cluster parameters */
638c2ecf20Sopenharmony_ci		struct ipu3_uapi_acc_param acc_param;
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci		/* ISP vector address space parameters */
668c2ecf20Sopenharmony_ci		struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params;
678c2ecf20Sopenharmony_ci		struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params;
688c2ecf20Sopenharmony_ci		struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params;
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci		/* ISP data memory (DMEM) parameters */
718c2ecf20Sopenharmony_ci		struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params;
728c2ecf20Sopenharmony_ci		struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params;
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci		/* Optical black level compensation */
758c2ecf20Sopenharmony_ci		struct ipu3_uapi_obgrid_param obgrid_param;
768c2ecf20Sopenharmony_ci	};
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ciIntel IPU3 ImgU uAPI data types
798c2ecf20Sopenharmony_ci===============================
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci.. kernel-doc:: drivers/staging/media/ipu3/include/intel-ipu3.h
82