1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  */
6 
7 #include "ia_css_pipe_util.h"
8 #include "ia_css_frame_public.h"
9 #include "ia_css_pipe.h"
10 #include "ia_css_util.h"
11 #include "assert_support.h"
12 
ia_css_pipe_util_pipe_input_format_bpp(const struct ia_css_pipe * const pipe)13 unsigned int ia_css_pipe_util_pipe_input_format_bpp(
14     const struct ia_css_pipe *const pipe)
15 {
16 	assert(pipe);
17 	assert(pipe->stream);
18 
19 	return ia_css_util_input_format_bpp(pipe->stream->config.input_config.format,
20 					    pipe->stream->config.pixels_per_clock == 2);
21 }
22 
ia_css_pipe_util_create_output_frames(struct ia_css_frame * frames[])23 void ia_css_pipe_util_create_output_frames(
24     struct ia_css_frame *frames[])
25 {
26 	unsigned int i;
27 
28 	assert(frames);
29 	for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
30 		frames[i] = NULL;
31 	}
32 }
33 
ia_css_pipe_util_set_output_frames(struct ia_css_frame * frames[],unsigned int idx,struct ia_css_frame * frame)34 void ia_css_pipe_util_set_output_frames(
35     struct ia_css_frame *frames[],
36     unsigned int idx,
37     struct ia_css_frame *frame)
38 {
39 	assert(idx < IA_CSS_BINARY_MAX_OUTPUT_PORTS);
40 
41 	frames[idx] = frame;
42 }
43