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 mipicsi_flag; 37 extern int pad_w; 38 extern int pad_h; 39 40 /* Minimum padding requirements for ISP2400 (BYT) */ 41 #define ISP2400_MIN_PAD_W 12 42 #define ISP2400_MIN_PAD_H 12 43 44 #define CSS_DTRACE_VERBOSITY_LEVEL 5 /* Controls trace verbosity */ 45 #define CSS_DTRACE_VERBOSITY_TIMEOUT 9 /* Verbosity on ISP timeout */ 46 #define MRFLD_MAX_ZOOM_FACTOR 1024 47 48 /* ISP2401 */ 49 #define ATOMISP_CSS_ISP_PIPE_VERSION_2_7 1 50 51 struct atomisp_format_bridge { 52 unsigned int pixelformat; 53 unsigned int depth; 54 u32 mbus_code; 55 enum ia_css_frame_format sh_fmt; 56 unsigned char description[32]; /* the same as struct v4l2_fmtdesc */ 57 bool planar; 58 }; 59 60 struct atomisp_fmt { 61 u32 pixelformat; 62 u32 depth; 63 u32 bytesperline; 64 u32 framesize; 65 u32 imagesize; 66 u32 width; 67 u32 height; 68 u32 bayer_order; 69 }; 70 71 #endif 72