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