RK3368 GPU version Rogue M 1.28
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / rogue_m / build / linux / 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 ### ###########################################################################
40
41 # Basic support option tuning for Android
42 #
43 SUPPORT_ANDROID_PLATFORM := 1
44 SUPPORT_OPENGLES1_V1_ONLY := 1
45 DONT_USE_SONAMES := 1
46
47 # Always print debugging after 5 seconds of no activity
48 #
49 CLIENT_DRIVER_DEFAULT_WAIT_RETRIES := 50
50
51 # Android WSEGL is always the same
52 #
53 OPK_DEFAULT := libpvrANDROID_WSEGL.so
54
55 # srvkm is always built
56 #
57 KERNEL_COMPONENTS := srvkm
58
59 # Kernel modules are always installed here under Android
60 #
61 # Time:2014-08-26 
62 # Note:change module's path from /system/modules/ to /system/lib/modules/
63 # Modifier: zxl
64 PVRSRV_MODULE_BASEDIR := /system/lib/modules/
65
66 # Enable secure FD export in Services
67 #
68 SUPPORT_SECURE_EXPORT := 1
69
70 # Disable multi sync support in Services
71 #
72 SUPPORT_MULTI_SYNC := 0
73
74 # It is no longer supported disable this for Android, but we can still
75 # do so for the Linux DDK, so don't use NonTunableOption.
76 #
77 override SUPPORT_ION := 1
78
79 # Show GPU activity in systrace
80 #
81 SUPPORT_GPUTRACE_EVENTS ?= 1
82
83 ##############################################################################
84 # Unless overridden by the user, assume the RenderScript Compute API level
85 # matches that of the SDK API_LEVEL.
86 #
87 RSC_API_LEVEL ?= $(API_LEVEL)
88 ifneq ($(findstring $(RSC_API_LEVEL),21 22),)
89 RSC_API_LEVEL := 20
90 endif
91
92 ##############################################################################
93 # JB MR1 introduces cross-process syncs associated with a fd.
94 # This requires a new enough kernel version to have the base/sync driver.
95 #
96 #zxl:Temporarily closed for user build mode(Depend on libgui: LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC)
97 EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC ?= 1
98
99 ifeq ($(PDUMP),1)
100 # PDUMPs won't process if any native synchronization is enabled
101 override EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC := 0
102 override SUPPORT_NATIVE_FENCE_SYNC := 0
103 override PVR_ANDROID_DEFER_CLEAR := 0
104 else
105 override SUPPORT_NATIVE_FENCE_SYNC := 1
106 endif
107
108 ##############################################################################
109 # Handle various platform includes
110 #
111 SYS_INCLUDES += \
112  -isystem $(ANDROID_ROOT)/external/zlib/src \
113  -isystem $(ANDROID_ROOT)/libnativehelper/include/nativehelper
114 SYS_KHRONOS_INCLUDES += \
115  -I$(ANDROID_ROOT)/frameworks/native/opengl/include
116
117 ##############################################################################
118 # Android doesn't use these install script variables. They're still in place
119 # because the Linux install scripts use them.
120 #
121 SHLIB_DESTDIR := not-used
122 EGL_DESTDIR := not-used
123
124 # Must give our EGL/GLES libraries a globally unique name
125 #
126 EGL_BASENAME_SUFFIX := _POWERVR_ROGUE
127
128 ##############################################################################
129 # In K and older, augment the libstdc++ includes with stlport includes. Any
130 # part of the C++ library not implemented by stlport will be handled by
131 # linking in libstdc++ too (see extra_config.mk).
132 #
133 # On L and newer, don't use stlport OR libstdc++ at all; just use libc++.
134 #
135 SYS_CXXFLAGS := -fuse-cxa-atexit $(SYS_CFLAGS)
136 ifeq ($(is_at_least_lollipop),1)
137 SYS_INCLUDES += \
138  -isystem $(ANDROID_ROOT)/external/libcxx/include
139 else
140 SYS_INCLUDES += \
141  -isystem $(ANDROID_ROOT)/bionic \
142  -isystem $(ANDROID_ROOT)/external/stlport/stlport
143 endif
144
145 ##############################################################################
146 # ICS requires that at least one driver EGLConfig advertises the
147 # EGL_RECORDABLE_ANDROID attribute. The platform requires that surfaces
148 # rendered with this config can be consumed by an OMX video encoder.
149 #
150 EGL_EXTENSION_ANDROID_RECORDABLE := 1
151
152 ##############################################################################
153 # ICS added the EGL_ANDROID_blob_cache extension. Enable support for this
154 # extension in EGL/GLESv2.
155 #
156 EGL_EXTENSION_ANDROID_BLOB_CACHE ?= 1
157
158 ##############################################################################
159 # Framebuffer target extension is used to find configs compatible with
160 # the framebuffer
161 #
162 EGL_EXTENSION_ANDROID_FRAMEBUFFER_TARGET := 1
163
164 ##############################################################################
165 # Disable the MEMINFO wrapper pvCpuVirtAddr feature. All Android DDK
166 # components no longer require it. This enables lazy CPU mappings, which
167 # improves allocation performance.
168 #
169 ifneq ($(PDUMP),1)
170 PVRSRV_NO_MEMINFO_CPU_VIRT_ADDR ?= 1
171 endif
172
173 ##############################################################################
174 # JB added a new corkscrew API for userland backtracing.
175 #
176 ifeq ($(is_at_least_lollipop),0)
177 PVR_ANDROID_HAS_CORKSCREW_API := 1
178 endif
179
180 ##############################################################################
181 # This is currently broken on KK. Disable until fixed.
182 #
183 SUPPORT_ANDROID_APPHINTS := 0
184
185 ##############################################################################
186 # KitKat added very provisional/early support for sRGB render targets
187 #
188 # (Leaving this optional until the framework makes it mandatory.)
189 #
190 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_sRGB ?= 1
191
192 ##############################################################################
193 # Switch on ADF support for KitKat MR1 or newer.
194 #
195 # Customers using AOSP KitKat MR1 sources need to copy and build the libadf
196 # and libadfhwc libraries from AOSP master system/core into their device/
197 # directories and build the components as dynamic libraries. Examples of how
198 # to do this are shown in the bundled 'pc_android' and 'generic_arm_android'
199 # directories in the device package.
200 #
201 # Customers using AOSP master do not need to make any changes.
202 # ADF requires kernel/common derivative kernels >= 3.10.
203 #
204 ifeq ($(is_at_least_kitkat_mr1),1)
205 #SUPPORT_ADF ?= 1
206 SUPPORT_DISPLAY_CLASS := 0
207 else
208 SUPPORT_DISPLAY_CLASS ?= 1
209 endif
210
211 ##############################################################################
212 # Versions of Android between Cupcake and KitKat MR1 required Java 6.
213 #
214 ifeq ($(is_at_least_lollipop),0)
215 LEGACY_USE_JAVA6 ?= 1
216 endif
217
218 ##############################################################################
219 # Versions of Android between ICS and KitKat MR1 used ion .heap_mask instead
220 # of .heap_id_mask.
221 #
222 ifeq ($(is_at_least_lollipop),0)
223 PVR_ANDROID_HAS_ION_FIELD_HEAP_MASK := 1
224 endif
225
226 ##############################################################################
227 # Lollipop supports 64-bit. Configure BCC to emit both 32-bit and 64-bit LLVM
228 # bitcode in the renderscript driver.
229 #
230 ifeq ($(is_at_least_lollipop),1)
231 PVR_ANDROID_BCC_MULTIARCH_SUPPORT := 1
232 endif
233
234 ##############################################################################
235 # Lollipop annotates the cursor allocation with USAGE_CURSOR to enable it to
236 # be accelerated with special cursor hardware (rather than wasting an
237 # overlay). This flag stops the DDK from blocking the allocation.
238 #
239 ifeq ($(is_at_least_lollipop),1)
240 PVR_ANDROID_HAS_GRALLOC_USAGE_CURSOR := 1
241 endif
242
243 ##############################################################################
244 # Lollipop changed the camera HAL metadata specification to require that
245 # CONTROL_MAX_REGIONS specifies 3 integers (instead of 1).
246 #
247 ifeq ($(is_at_least_lollipop),1)
248 PVR_ANDROID_CAMERA_CONTROL_MAX_REGIONS_HAS_THREE := 1
249 endif
250
251 ##############################################################################
252 # Lollipop adds async versions of the CPU access functions to gralloc.
253 #
254 ifeq ($(is_at_least_lollipop),1)
255 PVR_ANDROID_HAS_GRALLOC_ASYNC_LOCK := 1
256 endif
257
258 ##############################################################################
259 # Marshmallow needs --soname turned on
260 #
261 ifeq ($(is_at_least_marshmallow),1)
262 PVR_ANDROID_NEEDS_SONAME ?= 1
263 endif
264
265 ##############################################################################
266 # Marshmallow replaces RAW_SENSOR with RAW10, RAW12 and RAW16
267 #
268 ifeq ($(is_at_least_marshmallow),1)
269 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_RAWxx := 1
270 endif
271
272 ##############################################################################
273 # Marshmallow has redesigned sRGB support
274 #
275 ifeq ($(is_at_least_marshmallow),1)
276 PVR_ANDROID_HAS_SET_BUFFERS_DATASPACE ?= 1
277 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_sRGB := 0
278 endif
279
280 ##############################################################################
281 # fenv was rewritten in Marshmallow
282 #
283 ifeq ($(is_at_least_marshmallow),1)
284 PVR_ANDROID_HAS_WORKING_FESETROUND := 1
285 endif
286
287 ##############################################################################
288 # Marshmallow renderscript support
289 #
290 ifeq ($(is_at_least_marshmallow),1)
291 # Bump the RenderScript API level to 23 for future versions
292 # API_LEVEL itself shouldn't be touched.
293 RSC_API_LEVEL := 23
294
295 # RenderScript header file was moved in AOSP master
296 PVR_ANDROID_HAS_RS_INTERNAL_DEFINES := 1
297
298 # LLVM's MemoryBuffer is now passed via reference
299 PVR_ANDROID_HAS_RS_MEMBUFFER_REF := 1
300
301 # RenderScript ScriptGroup API has ScriptGroupBase instead of ScriptGroup
302 PVR_ANDROID_HAS_SCRIPTGROUPBASE := 1
303
304 # RenderScript elementData API is generic
305 PVR_ANDROID_POST_L_HAL := 1
306 endif
307
308 # Placeholder for future version handling
309 #
310 ifeq ($(is_future_version),1)
311 -include ../common/android/future_version.mk
312 endif