]>
Commit | Line | Data |
---|---|---|
a49d2536 AC |
1 | /* |
2 | * Support for Intel Camera Imaging ISP subsystem. | |
3 | * Copyright (c) 2015, Intel Corporation. | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms and conditions of the GNU General Public License, | |
7 | * version 2, as published by the Free Software Foundation. | |
8 | * | |
9 | * This program is distributed in the hope it will be useful, but WITHOUT | |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | * more details. | |
13 | */ | |
14 | ||
15 | #ifndef __SH_CSS_STRUCT_H | |
16 | #define __SH_CSS_STRUCT_H | |
17 | ||
18 | /* This header files contains the definition of the | |
19 | sh_css struct and friends; locigally the file would | |
20 | probably be called sh_css.h after the pattern | |
21 | <type>.h but sh_css.h is the predecesssor of ia_css.h | |
22 | so this could cause confusion; hence the _struct | |
23 | in the filename | |
24 | */ | |
25 | ||
26 | #include <type_support.h> | |
27 | #include <system_types.h> | |
28 | #include "ia_css_pipeline.h" | |
29 | #include "ia_css_pipe_public.h" | |
30 | #include "ia_css_frame_public.h" | |
31 | #include "ia_css_queue.h" | |
32 | #include "ia_css_irq.h" | |
33 | ||
34 | struct sh_css { | |
35 | struct ia_css_pipe *active_pipes[IA_CSS_PIPELINE_NUM_MAX]; | |
36 | /* All of the pipes created at any point of time. At this moment there can | |
37 | * be no more than MAX_SP_THREADS of them because pipe_num is reused as SP | |
38 | * thread_id to which a pipe's pipeline is associated. At a later point, if | |
39 | * we support more pipe objects, we should add test code to test that | |
40 | * possibility. Also, active_pipes[] should be able to hold only | |
41 | * SH_CSS_MAX_SP_THREADS objects. Anything else is misleading. */ | |
42 | struct ia_css_pipe *all_pipes[IA_CSS_PIPELINE_NUM_MAX]; | |
43 | void * (*malloc)(size_t bytes, bool zero_mem); | |
44 | void (*free)(void *ptr); | |
45 | #ifdef ISP2401 | |
46 | void * (*malloc_ex)(size_t bytes, bool zero_mem, const char *caller_func, int caller_line); | |
47 | void (*free_ex)(void *ptr, const char *caller_func, int caller_line); | |
48 | #endif | |
49 | void (*flush)(struct ia_css_acc_fw *fw); | |
50 | bool check_system_idle; | |
51 | #ifndef ISP2401 | |
52 | bool stop_copy_preview; | |
53 | #endif | |
54 | unsigned int num_cont_raw_frames; | |
55 | #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) | |
56 | unsigned int num_mipi_frames[N_CSI_PORTS]; | |
57 | struct ia_css_frame *mipi_frames[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM]; | |
58 | struct ia_css_metadata *mipi_metadata[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM]; | |
59 | unsigned int mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT]; | |
60 | unsigned int mipi_frame_size[N_CSI_PORTS]; | |
61 | #endif | |
62 | hrt_vaddress sp_bin_addr; | |
63 | hrt_data page_table_base_index; | |
d929fb4e | 64 | unsigned int size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/ |
a49d2536 AC |
65 | enum ia_css_irq_type irq_type; |
66 | unsigned int pipe_counter; | |
67 | ||
68 | unsigned int type; /* 2400 or 2401 for now */ | |
69 | }; | |
70 | ||
71 | #define IPU_2400 1 | |
72 | #define IPU_2401 2 | |
73 | ||
74 | #define IS_2400() (my_css.type == IPU_2400) | |
75 | #define IS_2401() (my_css.type == IPU_2401) | |
76 | ||
77 | extern struct sh_css my_css; | |
78 | ||
79 | #endif /* __SH_CSS_STRUCT_H */ | |
80 |