1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 * 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. 9 * 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 13 * more details. 14 */ 15 16 #ifndef __SH_CSS_MIPI_H 17 #define __SH_CSS_MIPI_H 18 19 #include <ia_css_err.h> /* ia_css_err */ 20 #include <ia_css_types.h> /* ia_css_pipe */ 21 #include <ia_css_stream_public.h> /* ia_css_stream_config */ 22 23 void 24 mipi_init(void); 25 26 bool mipi_is_free(void); 27 28 int 29 allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info); 30 31 int 32 free_mipi_frames(struct ia_css_pipe *pipe); 33 34 int 35 send_mipi_frames(struct ia_css_pipe *pipe); 36 37 /** 38 * @brief Calculate the required MIPI buffer sizes. 39 * Based on the stream configuration, calculate the 40 * required MIPI buffer sizes (in DDR words). 41 * 42 * @param[in] stream_cfg Point to the target stream configuration 43 * @param[out] size_mem_words MIPI buffer size in DDR words. 44 * 45 * @return 46 */ 47 int 48 calculate_mipi_buff_size( 49 struct ia_css_stream_config *stream_cfg, 50 unsigned int *size_mem_words); 51 52 #endif /* __SH_CSS_MIPI_H */ 53