1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 #ifndef _IA_CSS_STREAM_H_
17 #define _IA_CSS_STREAM_H_
19 #include <type_support.h>
20 #include <system_local.h>
21 #include <input_system.h>
22 #include "ia_css_types.h"
23 #include "ia_css_stream_public.h"
26 * structure to hold all internal stream related information
28 struct ia_css_stream {
29 struct ia_css_stream_config config;
30 struct ia_css_stream_info info;
31 rx_cfg_t csi_rx_config;
32 bool reconfigure_css_rx;
33 struct ia_css_pipe *last_pipe;
35 struct ia_css_pipe **pipes;
36 struct ia_css_pipe *continuous_pipe;
37 struct ia_css_isp_parameters *isp_params_configs;
38 struct ia_css_isp_parameters *per_frame_isp_params_configs;
44 bool stop_copy_preview;
48 /* @brief Get a binary in the stream, which binary has the shading correction.
50 * @param[in] stream: The stream.
51 * @return The binary which has the shading correction.
54 struct ia_css_binary *
55 ia_css_stream_get_shading_correction_binary(const struct ia_css_stream *stream);
57 struct ia_css_binary *
58 ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream);
60 struct ia_css_binary *
61 ia_css_stream_get_3a_binary(const struct ia_css_stream *stream);
64 ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream);
67 sh_css_params_set_binning_factor(struct ia_css_stream *stream,
68 unsigned int sensor_binning);
71 sh_css_invalidate_params(struct ia_css_stream *stream);
73 /* The following functions are used for testing purposes only */
74 const struct ia_css_fpn_table *
75 ia_css_get_fpn_table(struct ia_css_stream *stream);
77 /* @brief Get a pointer to the shading table.
79 * @param[in] stream: The stream.
80 * @return The pointer to the shading table.
83 struct ia_css_shading_table *
84 ia_css_get_shading_table(struct ia_css_stream *stream);
87 ia_css_get_isp_dis_coefficients(struct ia_css_stream *stream,
88 short *horizontal_coefficients,
89 short *vertical_coefficients);
92 ia_css_get_isp_dvs2_coefficients(struct ia_css_stream *stream,
93 short *hor_coefs_odd_real,
94 short *hor_coefs_odd_imag,
95 short *hor_coefs_even_real,
96 short *hor_coefs_even_imag,
97 short *ver_coefs_odd_real,
98 short *ver_coefs_odd_imag,
99 short *ver_coefs_even_real,
100 short *ver_coefs_even_imag);
103 ia_css_stream_isp_parameters_init(struct ia_css_stream *stream);
106 ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream);
108 #endif /*_IA_CSS_STREAM_H_*/