GNU Linux-libre 4.14.254-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / copy_output / copy_output_1.0 / ia_css_copy_output.host.c
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 #include "ia_css_copy_output.host.h"
16 #include "ia_css_binary.h"
17 #include "type_support.h"
18 #define IA_CSS_INCLUDE_CONFIGURATIONS
19 #include "ia_css_isp_configs.h"
20 #include "isp.h"
21
22 static const struct ia_css_copy_output_configuration default_config = {
23         .enable = false,
24 };
25
26 void
27 ia_css_copy_output_config(
28         struct sh_css_isp_copy_output_isp_config      *to,
29         const struct ia_css_copy_output_configuration *from,
30         unsigned size)
31 {
32         (void)size;
33         to->enable = from->enable;
34 }
35
36 void
37 ia_css_copy_output_configure(
38         const struct ia_css_binary     *binary,
39         bool enable)
40 {
41         struct ia_css_copy_output_configuration config = default_config;
42
43         config.enable = enable;
44
45         ia_css_configure_copy_output(binary, &config);
46 }
47