]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/atomisp_common.h
staging/atomisp: Add support for the Intel IPU v2
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / atomisp_common.h
1 /*
2 * Support for Medifield PNW Camera Imaging ISP subsystem.
3 *
4 * Copyright (c) 2010 Intel Corporation. All Rights Reserved.
5 *
6 * Copyright (c) 2010 Silicon Hive www.siliconhive.com.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version
10 * 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 *
22 */
23
24 #ifndef __ATOMISP_COMMON_H__
25 #define __ATOMISP_COMMON_H__
26
27 #include <linux/atomisp.h>
28
29 #include <linux/v4l2-mediabus.h>
30
31 #include <media/videobuf-core.h>
32
33 #include "atomisp_compat.h"
34
35 #include "ia_css.h"
36
37 extern int dbg_level;
38 extern int dbg_func;
39 extern int mipicsi_flag;
40 extern int pad_w;
41 extern int pad_h;
42
43 #define CSS_DTRACE_VERBOSITY_LEVEL 5 /* Controls trace verbosity */
44 #define CSS_DTRACE_VERBOSITY_TIMEOUT 9 /* Verbosity on ISP timeout */
45 #define MRFLD_MAX_ZOOM_FACTOR 1024
46 #ifdef ISP2401
47 #define ATOMISP_CSS_ISP_PIPE_VERSION_2_2 0
48 #define ATOMISP_CSS_ISP_PIPE_VERSION_2_7 1
49 #endif
50
51 #define IS_ISP2401(isp) \
52 (((isp)->media_dev.hw_revision & ATOMISP_HW_REVISION_MASK) \
53 >= (ATOMISP_HW_REVISION_ISP2401_LEGACY << ATOMISP_HW_REVISION_SHIFT))
54
55 struct atomisp_format_bridge {
56 unsigned int pixelformat;
57 unsigned int depth;
58 u32 mbus_code;
59 enum atomisp_css_frame_format sh_fmt;
60 unsigned char description[32]; /* the same as struct v4l2_fmtdesc */
61 bool planar;
62 };
63
64 struct atomisp_fmt {
65 u32 pixelformat;
66 u32 depth;
67 u32 bytesperline;
68 u32 framesize;
69 u32 imagesize;
70 u32 width;
71 u32 height;
72 u32 bayer_order;
73 };
74
75 struct atomisp_buffer {
76 struct videobuf_buffer vb;
77 };
78
79 #endif