1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Medifield PNW Camera Imaging ISP subsystem.
4  *
5  * Copyright (c) 2010 Intel Corporation. All Rights Reserved.
6  *
7  * Copyright (c) 2010 Silicon Hive www.siliconhive.com.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License version
11  * 2 as published by the Free Software Foundation.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  *
19  */
20 
21 #ifndef	__ATOMISP_COMMON_H__
22 #define	__ATOMISP_COMMON_H__
23 
24 #include "../../include/linux/atomisp.h"
25 
26 #include <linux/v4l2-mediabus.h>
27 
28 #include <media/videobuf2-v4l2.h>
29 
30 #include "atomisp_compat.h"
31 
32 #include "ia_css.h"
33 
34 extern int dbg_level;
35 extern int dbg_func;
36 extern int pad_w;
37 extern int pad_h;
38 
39 /* Minimum padding requirements for ISP2400 (BYT) */
40 #define ISP2400_MIN_PAD_W		12
41 #define ISP2400_MIN_PAD_H		12
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 
47 /* ISP2401 */
48 #define ATOMISP_CSS_ISP_PIPE_VERSION_2_7    1
49 
50 struct atomisp_format_bridge {
51 	unsigned int pixelformat;
52 	unsigned int depth;
53 	u32 mbus_code;
54 	enum ia_css_frame_format sh_fmt;
55 	unsigned char description[32];	/* the same as struct v4l2_fmtdesc */
56 	bool planar;
57 };
58 
59 struct atomisp_fmt {
60 	u32 pixelformat;
61 	u32 depth;
62 	u32 bytesperline;
63 	u32 framesize;
64 	u32 imagesize;
65 	u32 width;
66 	u32 height;
67 	u32 bayer_order;
68 };
69 
70 #endif
71