• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 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 __PIXELGEN_GLOBAL_H_INCLUDED__
17 #define __PIXELGEN_GLOBAL_H_INCLUDED__
18 
19 #include <type_support.h>
20 
21 /**
22  * Pixel-generator. ("pixelgen_global.h")
23  */
24 /*
25  * Duplicates "sync_generator_cfg_t" in "input_system_global.h".
26  */
27 typedef struct isp2401_sync_generator_cfg_s isp2401_sync_generator_cfg_t;
28 struct isp2401_sync_generator_cfg_s {
29 	u32	hblank_cycles;
30 	u32	vblank_cycles;
31 	u32	pixels_per_clock;
32 	u32	nr_of_frames;
33 	u32	pixels_per_line;
34 	u32	lines_per_frame;
35 };
36 
37 typedef enum {
38 	PIXELGEN_TPG_MODE_RAMP = 0,
39 	PIXELGEN_TPG_MODE_CHBO,
40 	PIXELGEN_TPG_MODE_MONO,
41 	N_PIXELGEN_TPG_MODE
42 } pixelgen_tpg_mode_t;
43 
44 /*
45  * "pixelgen_tpg_cfg_t" duplicates parts of
46  * "tpg_cfg_t" in "input_system_global.h".
47  */
48 typedef struct pixelgen_tpg_cfg_s pixelgen_tpg_cfg_t;
49 struct pixelgen_tpg_cfg_s {
50 	pixelgen_tpg_mode_t	mode;	/* CHBO, MONO */
51 
52 	struct {
53 		/* be used by CHBO and MON */
54 		u32 R1;
55 		u32 G1;
56 		u32 B1;
57 
58 		/* be used by CHBO only */
59 		u32 R2;
60 		u32 G2;
61 		u32 B2;
62 	} color_cfg;
63 
64 	struct {
65 		u32	h_mask;		/* horizontal mask */
66 		u32	v_mask;		/* vertical mask */
67 		u32	hv_mask;	/* horizontal+vertical mask? */
68 	} mask_cfg;
69 
70 	struct {
71 		s32	h_delta;	/* horizontal delta? */
72 		s32	v_delta;	/* vertical delta? */
73 	} delta_cfg;
74 
75 	isp2401_sync_generator_cfg_t	 sync_gen_cfg;
76 };
77 
78 /*
79  * "pixelgen_prbs_cfg_t" duplicates parts of
80  * prbs_cfg_t" in "input_system_global.h".
81  */
82 typedef struct pixelgen_prbs_cfg_s pixelgen_prbs_cfg_t;
83 struct pixelgen_prbs_cfg_s {
84 	s32	seed0;
85 	s32	seed1;
86 
87 	isp2401_sync_generator_cfg_t	sync_gen_cfg;
88 };
89 
90 /* end of Pixel-generator: TPG. ("pixelgen_global.h") */
91 #endif /* __PIXELGEN_GLOBAL_H_INCLUDED__ */
92