1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 #ifndef _IA_CSS_STREAM_H_ 8 #define _IA_CSS_STREAM_H_ 9 10 #include <type_support.h> 11 #include <system_local.h> 12 #include <input_system.h> 13 #include "ia_css_types.h" 14 #include "ia_css_stream_public.h" 15 16 /** 17 * structure to hold all internal stream related information 18 */ 19 struct ia_css_stream { 20 struct ia_css_stream_config config; 21 struct ia_css_stream_info info; 22 rx_cfg_t csi_rx_config; 23 bool reconfigure_css_rx; 24 struct ia_css_pipe *last_pipe; 25 int num_pipes; 26 struct ia_css_pipe **pipes; 27 struct ia_css_pipe *continuous_pipe; 28 struct ia_css_isp_parameters *isp_params_configs; 29 struct ia_css_isp_parameters *per_frame_isp_params_configs; 30 31 bool cont_capt; 32 bool disable_cont_vf; 33 34 /* ISP2401 */ 35 bool stop_copy_preview; 36 bool started; 37 }; 38 39 /* @brief Get a binary in the stream, which binary has the shading correction. 40 * 41 * @param[in] stream: The stream. 42 * @return The binary which has the shading correction. 43 * 44 */ 45 struct ia_css_binary * 46 ia_css_stream_get_shading_correction_binary(const struct ia_css_stream *stream); 47 48 struct ia_css_binary * 49 ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream); 50 51 struct ia_css_binary * 52 ia_css_stream_get_3a_binary(const struct ia_css_stream *stream); 53 54 unsigned int 55 ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream); 56 57 bool 58 sh_css_params_set_binning_factor(struct ia_css_stream *stream, 59 unsigned int sensor_binning); 60 61 void 62 sh_css_invalidate_params(struct ia_css_stream *stream); 63 64 /* The following functions are used for testing purposes only */ 65 const struct ia_css_fpn_table * 66 ia_css_get_fpn_table(struct ia_css_stream *stream); 67 68 /* @brief Get a pointer to the shading table. 69 * 70 * @param[in] stream: The stream. 71 * @return The pointer to the shading table. 72 * 73 */ 74 struct ia_css_shading_table * 75 ia_css_get_shading_table(struct ia_css_stream *stream); 76 77 void 78 ia_css_get_isp_dis_coefficients(struct ia_css_stream *stream, 79 short *horizontal_coefficients, 80 short *vertical_coefficients); 81 82 void 83 ia_css_get_isp_dvs2_coefficients(struct ia_css_stream *stream, 84 short *hor_coefs_odd_real, 85 short *hor_coefs_odd_imag, 86 short *hor_coefs_even_real, 87 short *hor_coefs_even_imag, 88 short *ver_coefs_odd_real, 89 short *ver_coefs_odd_imag, 90 short *ver_coefs_even_real, 91 short *ver_coefs_even_imag); 92 93 int 94 ia_css_stream_isp_parameters_init(struct ia_css_stream *stream); 95 96 void 97 ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream); 98 99 #endif /*_IA_CSS_STREAM_H_*/ 100