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 int
27 allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info);
28 
29 int
30 free_mipi_frames(struct ia_css_pipe *pipe);
31 
32 int
33 send_mipi_frames(struct ia_css_pipe *pipe);
34 
35 /**
36  * @brief Calculate the required MIPI buffer sizes.
37  * Based on the stream configuration, calculate the
38  * required MIPI buffer sizes (in DDR words).
39  *
40  * @param[in]	stream_cfg		Point to the target stream configuration
41  * @param[out]	size_mem_words	MIPI buffer size in DDR words.
42  *
43  * @return
44  */
45 int
46 calculate_mipi_buff_size(
47     struct ia_css_stream_config *stream_cfg,
48     unsigned int *size_mem_words);
49 
50 #endif /* __SH_CSS_MIPI_H */
51