diff options
Diffstat (limited to 'drivers/gpu/pvr/sgx_options.h')
-rw-r--r-- | drivers/gpu/pvr/sgx_options.h | 224 |
1 files changed, 224 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/sgx_options.h b/drivers/gpu/pvr/sgx_options.h new file mode 100644 index 00000000000..319db1c5854 --- /dev/null +++ b/drivers/gpu/pvr/sgx_options.h | |||
@@ -0,0 +1,224 @@ | |||
1 | /********************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. | ||
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, except | ||
10 | * as otherwise stated in writing, without any warranty; without even the | ||
11 | * implied warranty of merchantability or fitness for a particular purpose. | ||
12 | * See the GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | * The full GNU General Public License is included in this distribution in | ||
19 | * the file called "COPYING". | ||
20 | * | ||
21 | * Contact Information: | ||
22 | * Imagination Technologies Ltd. <gpl-support@imgtec.com> | ||
23 | * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK | ||
24 | * | ||
25 | ******************************************************************************/ | ||
26 | |||
27 | #if defined(DEBUG) || defined (INTERNAL_TEST) | ||
28 | #define DEBUG_SET_OFFSET OPTIONS_BIT0 | ||
29 | #define OPTIONS_BIT0 0x1 | ||
30 | #else | ||
31 | #define OPTIONS_BIT0 0x0 | ||
32 | #endif | ||
33 | |||
34 | #if defined(PDUMP) || defined (INTERNAL_TEST) | ||
35 | #define PDUMP_SET_OFFSET OPTIONS_BIT1 | ||
36 | #define OPTIONS_BIT1 (0x1 << 1) | ||
37 | #else | ||
38 | #define OPTIONS_BIT1 0x0 | ||
39 | #endif | ||
40 | |||
41 | #if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) || defined (INTERNAL_TEST) | ||
42 | #define PVRSRV_USSE_EDM_STATUS_DEBUG_SET_OFFSET OPTIONS_BIT2 | ||
43 | #define OPTIONS_BIT2 (0x1 << 2) | ||
44 | #else | ||
45 | #define OPTIONS_BIT2 0x0 | ||
46 | #endif | ||
47 | |||
48 | #if defined(SUPPORT_HW_RECOVERY) || defined (INTERNAL_TEST) | ||
49 | #define SUPPORT_HW_RECOVERY_SET_OFFSET OPTIONS_BIT3 | ||
50 | #define OPTIONS_BIT3 (0x1 << 3) | ||
51 | #else | ||
52 | #define OPTIONS_BIT3 0x0 | ||
53 | #endif | ||
54 | |||
55 | |||
56 | |||
57 | #if defined(PVR_SECURE_HANDLES) || defined (INTERNAL_TEST) | ||
58 | #define PVR_SECURE_HANDLES_SET_OFFSET OPTIONS_BIT4 | ||
59 | #define OPTIONS_BIT4 (0x1 << 4) | ||
60 | #else | ||
61 | #define OPTIONS_BIT4 0x0 | ||
62 | #endif | ||
63 | |||
64 | #if defined(SGX_BYPASS_SYSTEM_CACHE) || defined (INTERNAL_TEST) | ||
65 | #define SGX_BYPASS_SYSTEM_CACHE_SET_OFFSET OPTIONS_BIT5 | ||
66 | #define OPTIONS_BIT5 (0x1 << 5) | ||
67 | #else | ||
68 | #define OPTIONS_BIT5 0x0 | ||
69 | #endif | ||
70 | |||
71 | #if defined(SGX_DMS_AGE_ENABLE) || defined (INTERNAL_TEST) | ||
72 | #define SGX_DMS_AGE_ENABLE_SET_OFFSET OPTIONS_BIT6 | ||
73 | #define OPTIONS_BIT6 (0x1 << 6) | ||
74 | #else | ||
75 | #define OPTIONS_BIT6 0x0 | ||
76 | #endif | ||
77 | |||
78 | #if defined(SGX_FAST_DPM_INIT) || defined (INTERNAL_TEST) | ||
79 | #define SGX_FAST_DPM_INIT_SET_OFFSET OPTIONS_BIT8 | ||
80 | #define OPTIONS_BIT8 (0x1 << 8) | ||
81 | #else | ||
82 | #define OPTIONS_BIT8 0x0 | ||
83 | #endif | ||
84 | |||
85 | #if defined(SGX_FEATURE_WRITEBACK_DCU) || defined (INTERNAL_TEST) | ||
86 | #define SGX_FEATURE_DCU_SET_OFFSET OPTIONS_BIT9 | ||
87 | #define OPTIONS_BIT9 (0x1 << 9) | ||
88 | #else | ||
89 | #define OPTIONS_BIT9 0x0 | ||
90 | #endif | ||
91 | |||
92 | #if defined(SGX_FEATURE_MP) || defined (INTERNAL_TEST) | ||
93 | #define SGX_FEATURE_MP_SET_OFFSET OPTIONS_BIT10 | ||
94 | #define OPTIONS_BIT10 (0x1 << 10) | ||
95 | #else | ||
96 | #define OPTIONS_BIT10 0x0 | ||
97 | #endif | ||
98 | |||
99 | #if defined(SGX_FEATURE_MULTITHREADED_UKERNEL) || defined (INTERNAL_TEST) | ||
100 | #define SGX_FEATURE_MULTITHREADED_UKERNEL_SET_OFFSET OPTIONS_BIT11 | ||
101 | #define OPTIONS_BIT11 (0x1 << 11) | ||
102 | #else | ||
103 | #define OPTIONS_BIT11 0x0 | ||
104 | #endif | ||
105 | |||
106 | |||
107 | |||
108 | #if defined(SGX_FEATURE_OVERLAPPED_SPM) || defined (INTERNAL_TEST) | ||
109 | #define SGX_FEATURE_OVERLAPPED_SPM_SET_OFFSET OPTIONS_BIT12 | ||
110 | #define OPTIONS_BIT12 (0x1 << 12) | ||
111 | #else | ||
112 | #define OPTIONS_BIT12 0x0 | ||
113 | #endif | ||
114 | |||
115 | |||
116 | #if defined(SGX_FEATURE_SYSTEM_CACHE) || defined (INTERNAL_TEST) | ||
117 | #define SGX_FEATURE_SYSTEM_CACHE_SET_OFFSET OPTIONS_BIT13 | ||
118 | #define OPTIONS_BIT13 (0x1 << 13) | ||
119 | #else | ||
120 | #define OPTIONS_BIT13 0x0 | ||
121 | #endif | ||
122 | |||
123 | #if defined(SGX_SUPPORT_HWPROFILING) || defined (INTERNAL_TEST) | ||
124 | #define SGX_SUPPORT_HWPROFILING_SET_OFFSET OPTIONS_BIT14 | ||
125 | #define OPTIONS_BIT14 (0x1 << 14) | ||
126 | #else | ||
127 | #define OPTIONS_BIT14 0x0 | ||
128 | #endif | ||
129 | |||
130 | |||
131 | |||
132 | #if defined(SUPPORT_ACTIVE_POWER_MANAGEMENT) || defined (INTERNAL_TEST) | ||
133 | #define SUPPORT_ACTIVE_POWER_MANAGEMENT_SET_OFFSET OPTIONS_BIT15 | ||
134 | #define OPTIONS_BIT15 (0x1 << 15) | ||
135 | #else | ||
136 | #define OPTIONS_BIT15 0x0 | ||
137 | #endif | ||
138 | |||
139 | #if defined(SUPPORT_DISPLAYCONTROLLER_TILING) || defined (INTERNAL_TEST) | ||
140 | #define SUPPORT_DISPLAYCONTROLLER_TILING_SET_OFFSET OPTIONS_BIT16 | ||
141 | #define OPTIONS_BIT16 (0x1 << 16) | ||
142 | #else | ||
143 | #define OPTIONS_BIT16 0x0 | ||
144 | #endif | ||
145 | |||
146 | #if defined(SUPPORT_PERCONTEXT_PB) || defined (INTERNAL_TEST) | ||
147 | #define SUPPORT_PERCONTEXT_PB_SET_OFFSET OPTIONS_BIT17 | ||
148 | #define OPTIONS_BIT17 (0x1 << 17) | ||
149 | #else | ||
150 | #define OPTIONS_BIT17 0x0 | ||
151 | #endif | ||
152 | |||
153 | #if defined(SUPPORT_SGX_HWPERF) || defined (INTERNAL_TEST) | ||
154 | #define SUPPORT_SGX_HWPERF_SET_OFFSET OPTIONS_BIT18 | ||
155 | #define OPTIONS_BIT18 (0x1 << 18) | ||
156 | #else | ||
157 | #define OPTIONS_BIT18 0x0 | ||
158 | #endif | ||
159 | |||
160 | |||
161 | |||
162 | #if defined(SUPPORT_SGX_MMU_DUMMY_PAGE) || defined (INTERNAL_TEST) | ||
163 | #define SUPPORT_SGX_MMU_DUMMY_PAGE_SET_OFFSET OPTIONS_BIT19 | ||
164 | #define OPTIONS_BIT19 (0x1 << 19) | ||
165 | #else | ||
166 | #define OPTIONS_BIT19 0x0 | ||
167 | #endif | ||
168 | |||
169 | #if defined(SUPPORT_SGX_PRIORITY_SCHEDULING) || defined (INTERNAL_TEST) | ||
170 | #define SUPPORT_SGX_PRIORITY_SCHEDULING_SET_OFFSET OPTIONS_BIT20 | ||
171 | #define OPTIONS_BIT20 (0x1 << 20) | ||
172 | #else | ||
173 | #define OPTIONS_BIT20 0x0 | ||
174 | #endif | ||
175 | |||
176 | #if defined(SUPPORT_SGX_LOW_LATENCY_SCHEDULING) || defined (INTERNAL_TEST) | ||
177 | #define SUPPORT_SGX_LOW_LATENCY_SCHEDULING_SET_OFFSET OPTIONS_BIT21 | ||
178 | #define OPTIONS_BIT21 (0x1 << 21) | ||
179 | #else | ||
180 | #define OPTIONS_BIT21 0x0 | ||
181 | #endif | ||
182 | |||
183 | #if defined(USE_SUPPORT_NO_TA3D_OVERLAP) || defined (INTERNAL_TEST) | ||
184 | #define USE_SUPPORT_NO_TA3D_OVERLAP_SET_OFFSET OPTIONS_BIT22 | ||
185 | #define OPTIONS_BIT22 (0x1 << 22) | ||
186 | #else | ||
187 | #define OPTIONS_BIT22 0x0 | ||
188 | #endif | ||
189 | |||
190 | |||
191 | #if defined(SGX_FEATURE_MP) || defined (INTERNAL_TEST) | ||
192 | #define OPTIONS_HIGHBYTE ((SGX_FEATURE_MP_CORE_COUNT-1) << SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET) | ||
193 | #define SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET 28UL | ||
194 | #define SGX_FEATURE_MP_CORE_COUNT_SET_MASK 0xFF | ||
195 | #else | ||
196 | #define OPTIONS_HIGHBYTE 0x0 | ||
197 | #endif | ||
198 | |||
199 | |||
200 | |||
201 | #define SGX_BUILD_OPTIONS \ | ||
202 | OPTIONS_BIT0 |\ | ||
203 | OPTIONS_BIT1 |\ | ||
204 | OPTIONS_BIT2 |\ | ||
205 | OPTIONS_BIT3 |\ | ||
206 | OPTIONS_BIT4 |\ | ||
207 | OPTIONS_BIT5 |\ | ||
208 | OPTIONS_BIT6 |\ | ||
209 | OPTIONS_BIT8 |\ | ||
210 | OPTIONS_BIT9 |\ | ||
211 | OPTIONS_BIT10 |\ | ||
212 | OPTIONS_BIT11 |\ | ||
213 | OPTIONS_BIT12 |\ | ||
214 | OPTIONS_BIT13 |\ | ||
215 | OPTIONS_BIT14 |\ | ||
216 | OPTIONS_BIT15 |\ | ||
217 | OPTIONS_BIT16 |\ | ||
218 | OPTIONS_BIT17 |\ | ||
219 | OPTIONS_BIT18 |\ | ||
220 | OPTIONS_BIT19 |\ | ||
221 | OPTIONS_BIT20 |\ | ||
222 | OPTIONS_BIT21 |\ | ||
223 | OPTIONS_HIGHBYTE | ||
224 | |||