1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /** 3 Support for Intel Camera Imaging ISP subsystem. 4 Copyright (c) 2010 - 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 _ISP_TYPES_H_ 17 #define _ISP_TYPES_H_ 18 19 /* Workaround: hivecc complains about "tag "sh_css_3a_output" already declared" 20 without this extra decl. */ 21 struct ia_css_3a_output; 22 23 /* Input stream formats, these correspond to the MIPI formats and the way 24 * the CSS receiver sends these to the input formatter. 25 * The bit depth of each pixel element is stored in the global variable 26 * isp_bits_per_pixel. 27 * NOTE: for rgb565, we set isp_bits_per_pixel to 565, for all other rgb 28 * formats it's the actual depth (4, for 444, 8 for 888 etc). 29 */ 30 enum sh_stream_format { 31 sh_stream_format_yuv420_legacy, 32 sh_stream_format_yuv420, 33 sh_stream_format_yuv422, 34 sh_stream_format_rgb, 35 sh_stream_format_raw, 36 sh_stream_format_binary, /* bytestream such as jpeg */ 37 }; 38 39 struct s_isp_frames { 40 /* global variables that are written to by either the SP or the host, 41 every ISP binary needs these. */ 42 /* output frame */ 43 char *xmem_base_addr_y; 44 char *xmem_base_addr_uv; 45 char *xmem_base_addr_u; 46 char *xmem_base_addr_v; 47 /* 2nd output frame */ 48 char *xmem_base_addr_second_out_y; 49 char *xmem_base_addr_second_out_u; 50 char *xmem_base_addr_second_out_v; 51 /* input yuv frame */ 52 char *xmem_base_addr_y_in; 53 char *xmem_base_addr_u_in; 54 char *xmem_base_addr_v_in; 55 /* input raw frame */ 56 char *xmem_base_addr_raw; 57 /* output raw frame */ 58 char *xmem_base_addr_raw_out; 59 /* viewfinder output (vf_veceven) */ 60 char *xmem_base_addr_vfout_y; 61 char *xmem_base_addr_vfout_u; 62 char *xmem_base_addr_vfout_v; 63 /* overlay frame (for vf_pp) */ 64 char *xmem_base_addr_overlay_y; 65 char *xmem_base_addr_overlay_u; 66 char *xmem_base_addr_overlay_v; 67 /* pre-gdc output frame (gdc input) */ 68 char *xmem_base_addr_qplane_r; 69 char *xmem_base_addr_qplane_ratb; 70 char *xmem_base_addr_qplane_gr; 71 char *xmem_base_addr_qplane_gb; 72 char *xmem_base_addr_qplane_b; 73 char *xmem_base_addr_qplane_batr; 74 /* YUV as input, used by postisp binary */ 75 char *xmem_base_addr_yuv_16_y; 76 char *xmem_base_addr_yuv_16_u; 77 char *xmem_base_addr_yuv_16_v; 78 }; 79 80 #endif /* _ISP_TYPES_H_ */ 81