088d47fb1b45374055c1e8416f4d90b082812055
[android-sdk/device-ti-proprietary-open.git] / jacinto6 / sgx_src / eurasia_km / eurasiacon / build / linux2 / common / android / features.mk
1 ########################################################################### ###
2 #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3 #@License Dual MIT/GPLv2
4 #
5 # The contents of this file are subject to the MIT license as set out below.
6 #
7 # Permission is hereby granted, free of charge, to any person obtaining a copy
8 # of this software and associated documentation files (the "Software"), to deal
9 # in the Software without restriction, including without limitation the rights
10 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 # copies of the Software, and to permit persons to whom the Software is
12 # furnished to do so, subject to the following conditions:
13 #
14 # The above copyright notice and this permission notice shall be included in
15 # all copies or substantial portions of the Software.
16 #
17 # Alternatively, the contents of this file may be used under the terms of
18 # the GNU General Public License Version 2 ("GPL") in which case the provisions
19 # of GPL are applicable instead of those above.
20 #
21 # If you wish to allow use of your version of this file only under the terms of
22 # GPL, and not to allow others to use your version of this file under the terms
23 # of the MIT license, indicate your decision by deleting the provisions above
24 # and replace them with the notice and other provisions required by GPL as set
25 # out in the file called "GPL-COPYING" included in this distribution. If you do
26 # not delete the provisions above, a recipient may use your version of this file
27 # under the terms of either the MIT license or GPL.
28 #
29 # This License is also included in this distribution in the file called
30 # "MIT-COPYING".
31 #
32 # EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33 # PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34 # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35 # PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36 # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37 # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39 ### ###########################################################################
41 include ../common/android/platform_version.mk
43 # Basic support option tuning for Android
44 #
45 SUPPORT_ANDROID_PLATFORM := 1
46 SUPPORT_OPENGLES1_V1_ONLY := 1
48 # Meminfo IDs are required for buffer stamps
49 #
50 SUPPORT_MEMINFO_IDS := 1
52 # Enable services ion support by default
53 #
54 SUPPORT_ION ?= 1
56 # Need multi-process support in PDUMP
57 #
58 SUPPORT_PDUMP_MULTI_PROCESS := 1
60 # Always print debugging after 5 seconds of no activity
61 #
62 CLIENT_DRIVER_DEFAULT_WAIT_RETRIES := 50
64 # Android WSEGL is always the same
65 #
66 OPK_DEFAULT := libpvrANDROID_WSEGL.so
68 # srvkm is always built, but bufferclass_example is only built
69 # before EGL_image_external was generally available.
70 #
71 KERNEL_COMPONENTS := srvkm
73 # Kernel modules are always installed here under Android
74 #
75 PVRSRV_MODULE_BASEDIR := /system/modules/
77 # Use the new PVR_DPF implementation to allow lower message levels
78 # to be stripped from production drivers
79 #
80 PVRSRV_NEW_PVR_DPF := 1
82 # Production Android builds don't want PVRSRVGetDCSystemBuffer
83 #
84 SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER := 0
86 # Prefer to limit the 3D parameters heap to <16MB and move the
87 # extra 48MB to the general heap. This only affects cores with
88 # 28bit MMUs (520, 530, 531, 540).
89 #
90 SUPPORT_LARGE_GENERAL_HEAP := 1
92 # Enable a page pool for uncached memory allocations. This improves
93 # the performance of such allocations because the pages are temporarily
94 # not returned to Linux and therefore do not have to be re-invalidated
95 # (fewer cache invalidates are needed).
96 #
97 # Default the cache size to a maximum of 5400 pages (~21MB). If using
98 # newer Linux kernels (>=3.0) the cache may be reclaimed and become
99 # smaller than this maximum during runtime.
100 #
101 PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400
103 ##############################################################################
104 # Framebuffer target extension is used to find configs compatible with
105 # the framebuffer (added in JB MR1).
106 #
107 EGL_EXTENSION_ANDROID_FRAMEBUFFER_TARGET := 1
109 ##############################################################################
110 # Handle various platform includes for unittests
111 #
112 UNITTEST_INCLUDES := \
113 eurasiacon/android \
114 $(ANDROID_ROOT)/frameworks/base/native/include
116 ifeq ($(is_at_least_jellybean),1)
117 UNITTEST_INCLUDES += \
118 $(ANDROID_ROOT)/frameworks/native/include \
119 $(ANDROID_ROOT)/frameworks/native/opengl/include \
120 $(ANDROID_ROOT)/libnativehelper/include/nativehelper
121 else
122 UNITTEST_INCLUDES += \
123 $(ANDROID_ROOT)/frameworks/base/opengl/include \
124 $(ANDROID_ROOT)/dalvik/libnativehelper/include/nativehelper
125 endif
127 # But it doesn't have OpenVG headers
128 #
129 UNITTEST_INCLUDES += eurasiacon/unittests/include
131 ##############################################################################
132 # Future versions moved proprietary libraries to a vendor directory
133 #
134 SHLIB_DESTDIR := /system/vendor/lib
135 DEMO_DESTDIR := /system/vendor/bin
137 # EGL libraries go in a special place
138 #
139 EGL_DESTDIR := $(SHLIB_DESTDIR)/egl
141 ##############################################################################
142 # We can support OpenCL in the build since Froyo (stlport was added in 2.2)
143 #
144 SYS_CXXFLAGS := -fuse-cxa-atexit $(SYS_CFLAGS)
145 SYS_INCLUDES += \
146 -isystem $(ANDROID_ROOT)/bionic \
147 -isystem $(ANDROID_ROOT)/external/stlport/stlport
149 ##############################################################################
150 # Support the OES_EGL_image_external extensions in the client drivers.
151 #
152 GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1
153 GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1
155 ##############################################################################
156 # ICS requires that at least one driver EGLConfig advertises the
157 # EGL_RECORDABLE_ANDROID attribute. The platform requires that surfaces
158 # rendered with this config can be consumed by an OMX video encoder.
159 #
160 EGL_EXTENSION_ANDROID_RECORDABLE := 1
162 ##############################################################################
163 # ICS added the EGL_ANDROID_blob_cache extension. Enable support for this
164 # extension in EGL/GLESv2.
165 #
166 EGL_EXTENSION_ANDROID_BLOB_CACHE := 1
168 ##############################################################################
169 # ICS and earlier should rate-limit composition by waiting for 3D renders
170 # to complete in the compositor's eglSwapBuffers().
171 #
172 ifeq ($(is_at_least_jellybean),0)
173 PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
174 endif
176 ##############################################################################
177 # JB added a new corkscrew API for userland backtracing.
178 #
179 ifeq ($(is_at_least_jellybean),1)
180 PVR_ANDROID_HAS_CORKSCREW_API := 1
181 endif
183 ##############################################################################
184 # JB MR1 makes the framebuffer HAL obsolete.
185 #
186 # We also need to support IMPLEMENTATION_DEFINED so gralloc allocates
187 # framebuffers and GPU buffers in a 'preferred' format.
188 #
189 # FB HAL is still being used in TI post JB MR1 releases.
190 SUPPORT_ANDROID_FRAMEBUFFER_HAL := 1
191 ifeq ($(is_at_least_jellybean_mr1),0)
192 else
193 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED := 1
194 endif
196 ##############################################################################
197 # JB MR1 introduces cross-process syncs associated with a fd.
198 # This requires a new enough kernel version to have the base/sync driver.
199 #
200 ifeq ($(is_at_least_jellybean_mr1),1)
201 EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC := 0
202 PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC := 0
203 endif
205 ##############################################################################
206 # JB MR1 introduces new usage bits for the camera HAL and some new formats.
207 #
208 ifeq ($(is_at_least_jellybean_mr1),1)
209 PVR_ANDROID_HAS_GRALLOC_USAGE_HW_CAMERA := 1
210 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_RAW_SENSOR := 1
211 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_BLOB := 1
212 endif
214 ##############################################################################
215 # JB MR2 adds a new graphics HAL (gralloc) API function, lock_ycbcr(), and
216 # a so-called "flexible" YUV format enum.
217 #
218 ifeq ($(is_at_least_jellybean_mr2),1)
219 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YCbCr_420_888 := 1
220 PVR_ANDROID_GRALLOC_HAS_0_2_FEATURES := 1
221 endif
223 ##############################################################################
224 # In JB MR2 we can use a native helper library for the unittest wrapper.
225 # In earlier versions, we must use a less ideal approach.
226 #
227 ifeq ($(is_at_least_jellybean_mr2),0)
228 PVR_ANDROID_SURFACE_FIELD_NAME := \"mNativeSurface\"
229 endif
231 ##############################################################################
232 # JB MR2 introduces two new camera HAL formats (Y8, Y16)
233 #
234 ifeq ($(is_at_least_jellybean_mr2),1)
235 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y8 := 1
236 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y16 := 1
237 endif
239 ##############################################################################
240 # KK's EGL wrapper remaps EGLConfigs in the BGRA and BGRX formats to RGBA and
241 # RGBX respectively, for CpuConsumer compatibility. It does this because the
242 # usage bits for the gralloc allocation are not available to EGL.
243 #
244 # In this newer platform version, gralloc has been redefined to allow the
245 # 'format' parameter to gralloc->alloc() to be ignored for non-USAGE_SW
246 # allocations, so long as the bits per channel and sRGB-ness are preserved.
247 #
248 ifeq ($(is_at_least_kitkat),1)
249 PVR_ANDROID_REMAP_HW_ONLY_PIXEL_FORMATS := 1
250 endif
252 ##############################################################################
253 # Support newer HWC features in KK
254 #
255 ifeq ($(is_at_least_kitkat),1)
256 PVR_ANDROID_HWC_HAS_1_3_FEATURES := 1
257 endif
259 ##############################################################################
260 # KK eliminated egl.cfg. Only create for older versions.
261 #
262 ifeq ($(is_at_least_kitkat),0)
263 PVR_ANDROID_HAS_EGL_CFG := 1
264 endif
266 ##############################################################################
267 # KK has a bug in its browser that we need to work around.
268 #
269 ifeq ($(is_at_least_kitkat),1)
270 PVR_ANDROID_RELAX_GRALLOC_MODULE_MAP_CHECKS := 1
271 endif
273 ##############################################################################
274 # KK's Camera HAL requires that ACTIVE_ARRAY_SIZE specify xmin/ymin first
275 #
276 ifeq ($(is_at_least_kitkat),1)
277 PVR_ANDROID_CAMERA_ACTIVE_ARRAY_SIZE_HAS_XMIN_YMIN := 1
278 endif
280 ##############################################################################
281 # KitKat added a new memory tracking HAL. This enables gralloc support for
282 # the GRAPHICS/GL memtrack types.
283 #
284 ifeq ($(is_at_least_kitkat),1)
285 SUPPORT_ANDROID_MEMTRACK_HAL := 1
286 endif
288 # Placeholder for future version handling
289 #
290 ifeq ($(is_future_version),1)
291 -include ../common/android/future_version.mk
292 endif