Merge tag 'mtd/for-4.16' of git://git.infradead.org/linux-mtd
[linux-2.6-microblaze.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / sh_css_legacy.h
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 #ifndef _SH_CSS_LEGACY_H_
16 #define _SH_CSS_LEGACY_H_
17
18 #include <type_support.h>
19 #include <ia_css_err.h>
20 #include <ia_css_types.h>
21 #include <ia_css_frame_public.h>
22 #include <ia_css_pipe_public.h>
23 #include <ia_css_stream_public.h>
24
25 /* The pipe id type, distinguishes the kind of pipes that
26  *  can be run in parallel.
27  */
28 enum ia_css_pipe_id {
29         IA_CSS_PIPE_ID_PREVIEW,
30         IA_CSS_PIPE_ID_COPY,
31         IA_CSS_PIPE_ID_VIDEO,
32         IA_CSS_PIPE_ID_CAPTURE,
33         IA_CSS_PIPE_ID_YUVPP,
34 #ifndef ISP2401
35         IA_CSS_PIPE_ID_ACC,
36         IA_CSS_PIPE_ID_NUM
37 #else
38         IA_CSS_PIPE_ID_ACC
39 #endif
40 };
41 #ifdef ISP2401
42 #define IA_CSS_PIPE_ID_NUM (IA_CSS_PIPE_ID_ACC+1)
43 #endif
44
45 struct ia_css_pipe_extra_config {
46         bool enable_raw_binning;
47         bool enable_yuv_ds;
48         bool enable_high_speed;
49         bool enable_dvs_6axis;
50         bool enable_reduced_pipe;
51         bool enable_fractional_ds;
52         bool disable_vf_pp;
53 };
54
55 #define DEFAULT_PIPE_EXTRA_CONFIG \
56 { \
57         false,                          /* enable_raw_binning */ \
58         false,                          /* enable_yuv_ds */ \
59         false,                          /* enable_high_speed */ \
60         false,                          /* enable_dvs_6axis */ \
61         false,                          /* enable_reduced_pipe */ \
62         false,                          /* enable_fractional_ds */ \
63         false,                          /* disable_vf_pp */ \
64 }
65
66 enum ia_css_err
67 ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
68                          const struct ia_css_pipe_extra_config *extra_config,
69                          struct ia_css_pipe **pipe);
70
71 void
72 ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config *extra_config);
73
74 enum ia_css_err
75 ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe,
76                             enum ia_css_pipe_id *pipe_id);
77
78 /* DEPRECATED. FPN is not supported. */
79 enum ia_css_err
80 sh_css_set_black_frame(struct ia_css_stream *stream,
81                         const struct ia_css_frame *raw_black_frame);
82
83 #ifndef ISP2401
84 void
85 sh_css_enable_cont_capt(bool enable, bool stop_copy_preview);
86
87 #endif
88 #endif /* _SH_CSS_LEGACY_H_ */