1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  */
15 
16 #ifndef __IA_CSS_DVS_HOST_H
17 #define __IA_CSS_DVS_HOST_H
18 
19 #include "ia_css_frame_public.h"
20 #include "ia_css_binary.h"
21 #include "sh_css_params.h"
22 
23 #include "ia_css_types.h"
24 #include "ia_css_dvs_types.h"
25 #include "ia_css_dvs_param.h"
26 
27 /* For bilinear interpolation, we need to add +1 to input block height calculation.
28  * For bicubic interpolation, we will need to add +3 instaed */
29 #define DVS_GDC_BLI_INTERP_ENVELOPE 1
30 #define DVS_GDC_BCI_INTERP_ENVELOPE 3
31 
32 void
33 ia_css_dvs_config(
34     struct sh_css_isp_dvs_isp_config      *to,
35     const struct ia_css_dvs_configuration *from,
36     unsigned int size);
37 
38 void
39 ia_css_dvs_configure(
40     const struct ia_css_binary     *binary,
41     const struct ia_css_frame_info *from);
42 
43 void
44 convert_dvs_6axis_config(
45     struct ia_css_isp_parameters *params,
46     const struct ia_css_binary *binary);
47 
48 struct ia_css_host_data *
49 convert_allocate_dvs_6axis_config(
50     const struct ia_css_dvs_6axis_config *dvs_6axis_config,
51     const struct ia_css_binary *binary,
52     const struct ia_css_frame_info *dvs_in_frame_info);
53 
54 int
55 store_dvs_6axis_config(
56     const struct ia_css_dvs_6axis_config *dvs_6axis_config,
57     const struct ia_css_binary *binary,
58     const struct ia_css_frame_info *dvs_in_frame_info,
59     ia_css_ptr ddr_addr_y);
60 
61 #endif /* __IA_CSS_DVS_HOST_H */
62