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