]sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget-/translations/zh_CN/driver-api/media/v4l2-ispmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/zh_TW/driver-api/media/v4l2-ispmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/it_IT/driver-api/media/v4l2-ispmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ja_JP/driver-api/media/v4l2-ispmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ko_KR/driver-api/media/v4l2-ispmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/sp_SP/driver-api/media/v4l2-ispmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhG/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp.rsthKubhsection)}(hhh](htitle)}(h2V4L2 generic ISP parameters and statistics supporth]h2V4L2 generic ISP parameters and statistics support}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDesign rationaleh]hDesign rationale}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hISP configuration parameters and statistics are processed and collected by drivers and exchanged with userspace through data types that usually reflect the ISP peripheral registers layout.h]hISP configuration parameters and statistics are processed and collected by drivers and exchanged with userspace through data types that usually reflect the ISP peripheral registers layout.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXOEach ISP driver defines its own metadata output format for parameters and a metadata capture format for statistics. The buffer layout is realized by a set of C structures that reflects the registers layout. The number and types of C structures is fixed by the format definition and becomes part of the Linux kernel uAPI/uABI interface.h]hXOEach ISP driver defines its own metadata output format for parameters and a metadata capture format for statistics. The buffer layout is realized by a set of C structures that reflects the registers layout. The number and types of C structures is fixed by the format definition and becomes part of the Linux kernel uAPI/uABI interface.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hBecause of the hard requirement of backward compatibility when extending the user API/ABI interface, modifying an ISP driver capture or output metadata format after it has been accepted by mainline is very hard if not impossible.h]hBecause of the hard requirement of backward compatibility when extending the user API/ABI interface, modifying an ISP driver capture or output metadata format after it has been accepted by mainline is very hard if not impossible.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hIt generally happens, in fact, that after the first accepted revision of an ISP driver the buffers layout need to be modified, either to support new hardware blocks, to fix bugs or to support different revisions of the hardware.h]hIt generally happens, in fact, that after the first accepted revision of an ISP driver the buffers layout need to be modified, either to support new hardware blocks, to fix bugs or to support different revisions of the hardware.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hEach of these situations would require defining a new metadata format, making it really hard to maintain and extend drivers and requiring userspace to use the correct format depending on the kernel revision in use.h]hEach of these situations would require defining a new metadata format, making it really hard to maintain and extend drivers and requiring userspace to use the correct format depending on the kernel revision in use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]design-rationaleah ]h"]design rationaleah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h!V4L2 ISP configuration parametersh]h!V4L2 ISP configuration parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hhhhhK ubh)}(hXIFor these reasons, Video4Linux2 defines generic types for ISP configuration parameters and statistics. Drivers are still expected to define their own formats for their metadata output and capture nodes, but the buffers layout can be defined using the extensible and versioned types defined by include/uapi/linux/media/v4l2-isp.h.h]hXIFor these reasons, Video4Linux2 defines generic types for ISP configuration parameters and statistics. Drivers are still expected to define their own formats for their metadata output and capture nodes, but the buffers layout can be defined using the extensible and versioned types defined by include/uapi/linux/media/v4l2-isp.h.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hj*hhubh)}(hxDrivers are expected to provide the definitions of their supported ISP blocks and the expected maximum size of a buffer.h]hxDrivers are expected to provide the definitions of their supported ISP blocks and the expected maximum size of a buffer.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj*hhubh)}(hFor driver developers a set of helper functions to assist them with validation of the buffer received from userspace is available in drivers/media/v4l2-core/v4l2-isp.ch]hFor driver developers a set of helper functions to assist them with validation of the buffer received from userspace is available in drivers/media/v4l2-core/v4l2-isp.c}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hj*hhubeh}(h]!v4l2-isp-configuration-parametersah ]h"]!v4l2 isp configuration parametersah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h%V4L2 ISP support driver documentationh]h%V4L2 ISP support driver documentation}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhhhhhK0ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single%v4l2_isp_params_buffer_size (C macro)c.v4l2_isp_params_buffer_sizehNtauh1j~hjmhhhNhNubhdesc)}(hhh](hdesc_signature)}(hv4l2_isp_params_buffer_sizeh]hdesc_signature_line)}(hv4l2_isp_params_buffer_sizeh]h desc_name)}(hv4l2_isp_params_buffer_sizeh]h desc_sig_name)}(hjh]hv4l2_isp_params_buffer_size}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKubah}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjmhNhNubh)}(h1``v4l2_isp_params_buffer_size (max_params_size)``h]hliteral)}(hjh]h-v4l2_isp_params_buffer_size (max_params_size)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKhjmhhubh block_quote)}(h)Calculate size of v4l2_isp_params_buffer h]h)}(h(Calculate size of v4l2_isp_params_bufferh]h(Calculate size of v4l2_isp_params_buffer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjhKhjmhhubh container)}(hX**Parameters** ``max_params_size`` The total size of the ISP configuration blocks **Description** Users of the v4l2 extensible parameters will have differing sized data arrays depending on their specific parameter buffers. Drivers and userspace will need to be able to calculate the appropriate size of the struct to accommodate all ISP configuration blocks provided by the platform. This macro provides a convenient tool for the calculation.h](h)}(h**Parameters**h]hstrong)}(hj)h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj'ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKhj#ubhdefinition_list)}(hhh]hdefinition_list_item)}(hC``max_params_size`` The total size of the ISP configuration blocks h](hterm)}(h``max_params_size``h]j)}(hjPh]hmax_params_size}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKhjHubh definition)}(hhh]h)}(h.The total size of the ISP configuration blocksh]h.The total size of the ISP configuration blocks}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehKhjhubah}(h]h ]h"]h$]h&]uh1jfhjHubeh}(h]h ]h"]h$]h&]uh1jFhjehKhjCubah}(h]h ]h"]h$]h&]uh1jAhj#ubh)}(h**Description**h]j,)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKhj#ubh)}(hXXUsers of the v4l2 extensible parameters will have differing sized data arrays depending on their specific parameter buffers. Drivers and userspace will need to be able to calculate the appropriate size of the struct to accommodate all ISP configuration blocks provided by the platform. This macro provides a convenient tool for the calculation.h]hXXUsers of the v4l2 extensible parameters will have differing sized data arrays depending on their specific parameter buffers. Drivers and userspace will need to be able to calculate the appropriate size of the struct to accommodate all ISP configuration blocks provided by the platform. This macro provides a convenient tool for the calculation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKhj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1j!hjmhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j1v4l2_isp_params_validate_buffer_size (C function)&c.v4l2_isp_params_validate_buffer_sizehNtauh1j~hjmhhhNhNubj)}(hhh](j)}(heint v4l2_isp_params_validate_buffer_size (struct device *dev, struct vb2_buffer *vb, size_t max_size)h]j)}(hdint v4l2_isp_params_validate_buffer_size(struct device *dev, struct vb2_buffer *vb, size_t max_size)h](hdesc_sig_keyword_type)}(hinth]hint}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubj)}(h$v4l2_isp_params_validate_buffer_sizeh]j)}(h$v4l2_isp_params_validate_buffer_sizeh]h$v4l2_isp_params_validate_buffer_size}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubhdesc_parameterlist)}(h<(struct device *dev, struct vb2_buffer *vb, size_t max_size)h](hdesc_parameter)}(hstruct device *devh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hdeviceh]hdevice}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetj=modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jV ASTIdentifier)}jQjsb&c.v4l2_isp_params_validate_buffer_sizeasbuh1hhjubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubhdesc_sig_punctuation)}(h*h]h*}(hjshhhNhNubah}(h]h ]pah"]h$]h&]uh1jqhjubj)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct vb2_buffer *vbh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h vb2_bufferh]h vb2_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejQ reftargetjmodnameN classnameNjUjX)}j[]j_&c.v4l2_isp_params_validate_buffer_sizeasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjr)}(hjuh]h*}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(hvbh]hvb}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hsize_t max_sizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypejQ reftargetjmodnameN classnameNjUjX)}j[]j_&c.v4l2_isp_params_validate_buffer_sizeasbuh1hhjubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmax_sizeh]hmax_size}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(h Validate a V4L2 ISP buffer sizesh]h Validate a V4L2 ISP buffer sizes}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKhjahhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj|jj|jjjuh1jhhhjmhNhNubj")}(hX**Parameters** ``struct device *dev`` the driver's device pointer ``struct vb2_buffer *vb`` the videobuf2 buffer ``size_t max_size`` the maximum allowed buffer size **Description** This function performs validation of the size of a V4L2 ISP parameters buffer before the driver can access the actual data buffer content. After the sizes validation, drivers should copy the buffer content to a kernel-only memory area to prevent userspace from modifying it, before completing validation using v4l2_isp_params_validate_buffer(). The **vb** buffer as received from the vb2 .buf_prepare() operation is checked against **max_size** and it's validated to be large enough to accommodate at least one ISP configuration block.h](h)}(h**Parameters**h]j,)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK#hjubjB)}(hhh](jG)}(h3``struct device *dev`` the driver's device pointer h](jM)}(h``struct device *dev``h]j)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK hjubjg)}(hhh]h)}(hthe driver's device pointerh]hthe driver’s device pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK hjubah}(h]h ]h"]h$]h&]uh1jfhjubeh}(h]h ]h"]h$]h&]uh1jFhjhK hjubjG)}(h/``struct vb2_buffer *vb`` the videobuf2 buffer h](jM)}(h``struct vb2_buffer *vb``h]j)}(hjh]hstruct vb2_buffer *vb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK!hjubjg)}(hhh]h)}(hthe videobuf2 bufferh]hthe videobuf2 buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK!hjubah}(h]h ]h"]h$]h&]uh1jfhjubeh}(h]h ]h"]h$]h&]uh1jFhjhK!hjubjG)}(h4``size_t max_size`` the maximum allowed buffer size h](jM)}(h``size_t max_size``h]j)}(hjh]hsize_t max_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK"hjubjg)}(hhh]h)}(hthe maximum allowed buffer sizeh]hthe maximum allowed buffer size}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hK"hj-ubah}(h]h ]h"]h$]h&]uh1jfhjubeh}(h]h ]h"]h$]h&]uh1jFhj,hK"hjubeh}(h]h ]h"]h$]h&]uh1jAhjubh)}(h**Description**h]j,)}(hjRh]h Description}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjPubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK$hjubh)}(hThis function performs validation of the size of a V4L2 ISP parameters buffer before the driver can access the actual data buffer content.h]hThis function performs validation of the size of a V4L2 ISP parameters buffer before the driver can access the actual data buffer content.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK#hjubh)}(hAfter the sizes validation, drivers should copy the buffer content to a kernel-only memory area to prevent userspace from modifying it, before completing validation using v4l2_isp_params_validate_buffer().h]hAfter the sizes validation, drivers should copy the buffer content to a kernel-only memory area to prevent userspace from modifying it, before completing validation using v4l2_isp_params_validate_buffer().}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK&hjubh)}(hThe **vb** buffer as received from the vb2 .buf_prepare() operation is checked against **max_size** and it's validated to be large enough to accommodate at least one ISP configuration block.h](hThe }(hjhhhNhNubj,)}(h**vb**h]hvb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhM buffer as received from the vb2 .buf_prepare() operation is checked against }(hjhhhNhNubj,)}(h **max_size**h]hmax_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh] and it’s validated to be large enough to accommodate at least one ISP configuration block.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK*hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j!hjmhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*v4l2_isp_params_block_type_info (C struct)!c.v4l2_isp_params_block_type_infohNtauh1j~hjmhhhNhNubj)}(hhh](j)}(hv4l2_isp_params_block_type_infoh]j)}(h&struct v4l2_isp_params_block_type_infoh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK1ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK1ubj)}(hv4l2_isp_params_block_type_infoh]j)}(hjh]hv4l2_isp_params_block_type_info}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhK1ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhK1ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhK1hjhhubj)}(hhh]h)}(hV4L2 ISP per-block-type infoh]hV4L2 ISP per-block-type info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK4hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK1ubeh}(h]h ](jstructeh"]h$]h&]jjjj3jj3jjjuh1jhhhjmhNhNubj")}(h**Definition**:: struct v4l2_isp_params_block_type_info { size_t size; }; **Members** ``size`` the block type expected sizeh](h)}(h**Definition**::h](j,)}(h**Definition**h]h Definition}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj;ubh:}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK8hj7ubh literal_block)}(hhj7ubjB)}(hhh]jG)}(h%``size`` the block type expected sizeh](jM)}(h``size``h]j)}(hjh]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK5hjubjg)}(hhh]h)}(hthe block type expected sizeh]hthe block type expected size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK6hjubah}(h]h ]h"]h$]h&]uh1jfhjubeh}(h]h ]h"]h$]h&]uh1jFhjhK5hjubah}(h]h ]h"]h$]h&]uh1jAhj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1j!hjmhhhNhNubh)}(h**Description**h]j,)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK9hjmhhubh)}(hThe v4l2_isp_params_block_type_info collects information of the ISP configuration block types for validation purposes. It currently only contains the expected block type size.h]hThe v4l2_isp_params_block_type_info collects information of the ISP configuration block types for validation purposes. It currently only contains the expected block type size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK6hjmhhubh)}(hDrivers shall prepare a list of block type info, indexed by block type, one for each supported ISP block type and correctly populate them with the expected block type size.h]hDrivers shall prepare a list of block type info, indexed by block type, one for each supported ISP block type and correctly populate them with the expected block type size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhK:hjmhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,v4l2_isp_params_validate_buffer (C function)!c.v4l2_isp_params_validate_bufferhNtauh1j~hjmhhhNhNubj)}(hhh](j)}(hint v4l2_isp_params_validate_buffer (struct device *dev, struct vb2_buffer *vb, const struct v4l2_isp_params_buffer *buffer, const struct v4l2_isp_params_block_type_info *type_info, size_t num_block_types)h]j)}(hint v4l2_isp_params_validate_buffer(struct device *dev, struct vb2_buffer *vb, const struct v4l2_isp_params_buffer *buffer, const struct v4l2_isp_params_block_type_info *type_info, size_t num_block_types)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKDubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj(hKDubj)}(hv4l2_isp_params_validate_bufferh]j)}(hv4l2_isp_params_validate_bufferh]hv4l2_isp_params_validate_buffer}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj(hKDubj)}(h(struct device *dev, struct vb2_buffer *vb, const struct v4l2_isp_params_buffer *buffer, const struct v4l2_isp_params_block_type_info *type_info, size_t num_block_types)h](j)}(hstruct device *devh](j)}(hjh]hstruct}(hjWhhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhjSubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubh)}(hhh]j)}(hdeviceh]hdevice}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&] refdomainjreftypejQ reftargetjwmodnameN classnameNjUjX)}j[]j^)}jQj=sb!c.v4l2_isp_params_validate_bufferasbuh1hhjSubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubjr)}(hjuh]h*}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjSubj)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjOubj)}(hstruct vb2_buffer *vbh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h vb2_bufferh]h vb2_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejQ reftargetjmodnameN classnameNjUjX)}j[]j!c.v4l2_isp_params_validate_bufferasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjr)}(hjuh]h*}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(hvbh]hvb}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjOubj)}(h+const struct v4l2_isp_params_buffer *bufferh](j)}(hconsth]hconst}(hj9hhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhj5ubj)}(h h]h }(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(hjh]hstruct}(hjUhhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhj5ubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubh)}(hhh]j)}(hv4l2_isp_params_bufferh]hv4l2_isp_params_buffer}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&] refdomainjreftypejQ reftargetjumodnameN classnameNjUjX)}j[]j!c.v4l2_isp_params_validate_bufferasbuh1hhj5ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubjr)}(hjuh]h*}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj5ubj)}(hbufferh]hbuffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjOubj)}(h7const struct v4l2_isp_params_block_type_info *type_infoh](j)}(hj;h]hconst}(hjhhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j&ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hv4l2_isp_params_block_type_infoh]hv4l2_isp_params_block_type_info}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejQ reftargetj modnameN classnameNjUjX)}j[]j!c.v4l2_isp_params_validate_bufferasbuh1hhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjr)}(hjuh]h*}(hj* hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(h type_infoh]h type_info}(hj7 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjOubj)}(hsize_t num_block_typesh](h)}(hhh]j)}(hsize_th]hsize_t}(hjS hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjP ubah}(h]h ]h"]h$]h&] refdomainjreftypejQ reftargetjU modnameN classnameNjUjX)}j[]j!c.v4l2_isp_params_validate_bufferasbuh1hhjL ubj)}(h h]h }(hjq hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjL ubj)}(hnum_block_typesh]hnum_block_types}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjL ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjOubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhj(hKDubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhj(hKDubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj(hKDhjhhubj)}(hhh]h)}(h%Validate a V4L2 ISP parameters bufferh]h%Validate a V4L2 ISP parameters buffer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKDhj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhj(hKDubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjmhNhNubj")}(hX**Parameters** ``struct device *dev`` the driver's device pointer ``struct vb2_buffer *vb`` the videobuf2 buffer ``const struct v4l2_isp_params_buffer *buffer`` the V4L2 ISP parameters buffer ``const struct v4l2_isp_params_block_type_info *type_info`` the array of per-block-type validation info ``size_t num_block_types`` the number of block types in the type_info array **Description** This function completes the validation of a V4L2 ISP parameters buffer, verifying each configuration block correctness before the driver can use them to program the hardware. Drivers should use this function after having validated the correctness of the vb2 buffer sizes by using the v4l2_isp_params_validate_buffer_size() helper first. Once the buffer size has been validated, drivers should perform a copy of the user provided buffer into a kernel-only memory buffer to prevent userspace from modifying its content after it has been submitted to the driver, and then call this function to complete validation.h](h)}(h**Parameters**h]j,)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKHhj ubjB)}(hhh](jG)}(h3``struct device *dev`` the driver's device pointer h](jM)}(h``struct device *dev``h]j)}(hj h]hstruct device *dev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKEhj ubjg)}(hhh]h)}(hthe driver's device pointerh]hthe driver’s device pointer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKEhj ubah}(h]h ]h"]h$]h&]uh1jfhj ubeh}(h]h ]h"]h$]h&]uh1jFhj hKEhj ubjG)}(h/``struct vb2_buffer *vb`` the videobuf2 buffer h](jM)}(h``struct vb2_buffer *vb``h]j)}(hj# h]hstruct vb2_buffer *vb}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj! ubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKFhj ubjg)}(hhh]h)}(hthe videobuf2 bufferh]hthe videobuf2 buffer}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8 hKFhj9 ubah}(h]h ]h"]h$]h&]uh1jfhj ubeh}(h]h ]h"]h$]h&]uh1jFhj8 hKFhj ubjG)}(hO``const struct v4l2_isp_params_buffer *buffer`` the V4L2 ISP parameters buffer h](jM)}(h/``const struct v4l2_isp_params_buffer *buffer``h]j)}(hj\ h]h+const struct v4l2_isp_params_buffer *buffer}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKGhjV ubjg)}(hhh]h)}(hthe V4L2 ISP parameters bufferh]hthe V4L2 ISP parameters buffer}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjq hKGhjr ubah}(h]h ]h"]h$]h&]uh1jfhjV ubeh}(h]h ]h"]h$]h&]uh1jFhjq hKGhj ubjG)}(hh``const struct v4l2_isp_params_block_type_info *type_info`` the array of per-block-type validation info h](jM)}(h;``const struct v4l2_isp_params_block_type_info *type_info``h]j)}(hj h]h7const struct v4l2_isp_params_block_type_info *type_info}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKHhj ubjg)}(hhh]h)}(h+the array of per-block-type validation infoh]h+the array of per-block-type validation info}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKHhj ubah}(h]h ]h"]h$]h&]uh1jfhj ubeh}(h]h ]h"]h$]h&]uh1jFhj hKHhj ubjG)}(hL``size_t num_block_types`` the number of block types in the type_info array h](jM)}(h``size_t num_block_types``h]j)}(hj h]hsize_t num_block_types}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jLhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKIhj ubjg)}(hhh]h)}(h0the number of block types in the type_info arrayh]h0the number of block types in the type_info array}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKIhj ubah}(h]h ]h"]h$]h&]uh1jfhj ubeh}(h]h ]h"]h$]h&]uh1jFhj hKIhj ubeh}(h]h ]h"]h$]h&]uh1jAhj ubh)}(h**Description**h]j,)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKKhj ubh)}(hThis function completes the validation of a V4L2 ISP parameters buffer, verifying each configuration block correctness before the driver can use them to program the hardware.h]hThis function completes the validation of a V4L2 ISP parameters buffer, verifying each configuration block correctness before the driver can use them to program the hardware.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKJhj ubh)}(hXDrivers should use this function after having validated the correctness of the vb2 buffer sizes by using the v4l2_isp_params_validate_buffer_size() helper first. Once the buffer size has been validated, drivers should perform a copy of the user provided buffer into a kernel-only memory buffer to prevent userspace from modifying its content after it has been submitted to the driver, and then call this function to complete validation.h]hXDrivers should use this function after having validated the correctness of the vb2 buffer sizes by using the v4l2_isp_params_validate_buffer_size() helper first. Once the buffer size has been validated, drivers should perform a copy of the user provided buffer into a kernel-only memory buffer to prevent userspace from modifying its content after it has been submitted to the driver, and then call this function to complete validation.}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-isp:49: ./include/media/v4l2-isp.hhKNhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j!hjmhhhNhNubeh}(h]%v4l2-isp-support-driver-documentationah ]h"]%v4l2 isp support driver documentationah$]h&]uh1hhhhhhhhK0ubeh}(h]2v4l2-generic-isp-parameters-and-statistics-supportah ]h"]2v4l2 generic isp parameters and statistics supportah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjw error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jQ jN j'j$jjjgjI jF u nametypes}(jQ j'jjjI uh}(jN hj$hjgj*jF jmjjjjjjj ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.