2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
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.
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
15 #include "ia_css_frame.h"
16 #include "ia_css_types.h"
17 #include "sh_css_defs.h"
18 #include "ia_css_debug.h"
19 #include "assert_support.h"
20 #define IA_CSS_INCLUDE_CONFIGURATIONS
21 #include "ia_css_isp_configs.h"
24 #include "ia_css_qplane.host.h"
26 static const struct ia_css_qplane_configuration default_config
= {
27 .pipe
= (struct sh_css_sp_pipeline
*)NULL
,
32 struct sh_css_isp_qplane_isp_config
*to
,
33 const struct ia_css_qplane_configuration
*from
,
36 unsigned elems_a
= ISP_VEC_NELEMS
;
39 ia_css_dma_configure_from_info(&to
->port_b
, from
->info
);
40 to
->width_a_over_b
= elems_a
/ to
->port_b
.elems
;
42 /* Assume divisiblity here, may need to generalize to fixed point. */
43 assert (elems_a
% to
->port_b
.elems
== 0);
45 to
->inout_port_config
= from
->pipe
->inout_port_config
;
46 to
->format
= from
->info
->format
;
50 ia_css_qplane_configure(
51 const struct sh_css_sp_pipeline
*pipe
,
52 const struct ia_css_binary
*binary
,
53 const struct ia_css_frame_info
*info
)
55 struct ia_css_qplane_configuration config
= default_config
;
60 ia_css_configure_qplane(binary
, &config
);