]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.h
staging/atomisp: Add support for the Intel IPU v2
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / sh_css_mipi.h
1 /*
2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 */
14
15 #ifndef __SH_CSS_MIPI_H
16 #define __SH_CSS_MIPI_H
17
18 #include <ia_css_err.h> /* ia_css_err */
19 #include <ia_css_types.h> /* ia_css_pipe */
20 #include <ia_css_stream_public.h> /* ia_css_stream_config */
21
22 void
23 mipi_init(void);
24
25 enum ia_css_err
26 allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info);
27
28 enum ia_css_err
29 free_mipi_frames(struct ia_css_pipe *pipe);
30
31 enum ia_css_err
32 send_mipi_frames(struct ia_css_pipe *pipe);
33
34 /**
35 * @brief Calculate the required MIPI buffer sizes.
36 * Based on the stream configuration, calculate the
37 * required MIPI buffer sizes (in DDR words).
38 *
39 * @param[in] stream_cfg Point to the target stream configuration
40 * @param[out] size_mem_words MIPI buffer size in DDR words.
41 *
42 * @return
43 */
44 enum ia_css_err
45 calculate_mipi_buff_size(
46 struct ia_css_stream_config *stream_cfg,
47 unsigned int *size_mem_words);
48
49 #endif /* __SH_CSS_MIPI_H */