19d4fa1a1SMauro Carvalho Chehab /* 29d4fa1a1SMauro Carvalho Chehab * Support for Intel Camera Imaging ISP subsystem. 39d4fa1a1SMauro Carvalho Chehab * Copyright (c) 2015, Intel Corporation. 49d4fa1a1SMauro Carvalho Chehab * 59d4fa1a1SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify it 69d4fa1a1SMauro Carvalho Chehab * under the terms and conditions of the GNU General Public License, 79d4fa1a1SMauro Carvalho Chehab * version 2, as published by the Free Software Foundation. 89d4fa1a1SMauro Carvalho Chehab * 99d4fa1a1SMauro Carvalho Chehab * This program is distributed in the hope it will be useful, but WITHOUT 109d4fa1a1SMauro Carvalho Chehab * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 119d4fa1a1SMauro Carvalho Chehab * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 129d4fa1a1SMauro Carvalho Chehab * more details. 139d4fa1a1SMauro Carvalho Chehab */ 149d4fa1a1SMauro Carvalho Chehab 159d4fa1a1SMauro Carvalho Chehab #ifndef __SH_CSS_MIPI_H 169d4fa1a1SMauro Carvalho Chehab #define __SH_CSS_MIPI_H 179d4fa1a1SMauro Carvalho Chehab 189d4fa1a1SMauro Carvalho Chehab #include <ia_css_err.h> /* ia_css_err */ 199d4fa1a1SMauro Carvalho Chehab #include <ia_css_types.h> /* ia_css_pipe */ 209d4fa1a1SMauro Carvalho Chehab #include <ia_css_stream_public.h> /* ia_css_stream_config */ 219d4fa1a1SMauro Carvalho Chehab 229d4fa1a1SMauro Carvalho Chehab void 239d4fa1a1SMauro Carvalho Chehab mipi_init(void); 249d4fa1a1SMauro Carvalho Chehab 2541022d35SMauro Carvalho Chehab int 269d4fa1a1SMauro Carvalho Chehab allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info); 279d4fa1a1SMauro Carvalho Chehab 2841022d35SMauro Carvalho Chehab int 299d4fa1a1SMauro Carvalho Chehab free_mipi_frames(struct ia_css_pipe *pipe); 309d4fa1a1SMauro Carvalho Chehab 3141022d35SMauro Carvalho Chehab int 329d4fa1a1SMauro Carvalho Chehab send_mipi_frames(struct ia_css_pipe *pipe); 339d4fa1a1SMauro Carvalho Chehab 349d4fa1a1SMauro Carvalho Chehab /** 359d4fa1a1SMauro Carvalho Chehab * @brief Calculate the required MIPI buffer sizes. 369d4fa1a1SMauro Carvalho Chehab * Based on the stream configuration, calculate the 379d4fa1a1SMauro Carvalho Chehab * required MIPI buffer sizes (in DDR words). 389d4fa1a1SMauro Carvalho Chehab * 399d4fa1a1SMauro Carvalho Chehab * @param[in] stream_cfg Point to the target stream configuration 409d4fa1a1SMauro Carvalho Chehab * @param[out] size_mem_words MIPI buffer size in DDR words. 419d4fa1a1SMauro Carvalho Chehab * 429d4fa1a1SMauro Carvalho Chehab * @return 439d4fa1a1SMauro Carvalho Chehab */ 4441022d35SMauro Carvalho Chehab int 459d4fa1a1SMauro Carvalho Chehab calculate_mipi_buff_size( 469d4fa1a1SMauro Carvalho Chehab struct ia_css_stream_config *stream_cfg, 479d4fa1a1SMauro Carvalho Chehab unsigned int *size_mem_words); 489d4fa1a1SMauro Carvalho Chehab 499d4fa1a1SMauro Carvalho Chehab #endif /* __SH_CSS_MIPI_H */ 50