1 ########################################################################### ###
2 #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3 #@License Dual MIT/GPLv2
5 # The contents of this file are subject to the MIT license as set out below.
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:
14 # The above copyright notice and this permission notice shall be included in
15 # all copies or substantial portions of the Software.
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.
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.
29 # This License is also included in this distribution in the file called
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 ../config/preconfig.mk
43 # If a TARGET_PRODUCT is specified but not a TARGET_DEVICE, try to
44 # derive the TARGET_DEVICE from TARGET_PRODUCT.
46 ifeq ($(TARGET_DEVICE),)
47 override TARGET_DEVICE := \
48 $(patsubst mini_%,%,$(patsubst full_%,%,$(TARGET_PRODUCT)))
51 ifeq ($(TARGET_DEVICE),)
52 override TARGET_DEVICE := pc
59 #RGX_BVNC ?= 4.31.4.55
61 include ../common/android/paths.mk
62 include ../common/android/arch.mk
63 include ../common/android/features.mk
65 ifeq ($(SUPPORT_ADF),1)
66 ifneq ($(is_at_least_lollipop),1)
68 -isystem $(ANDROID_ROOT)/device/img/pc/adf/libadf/include \
69 -isystem $(ANDROID_ROOT)/device/img/pc/adf/libadfhwc/include
73 ifeq ($(NO_HARDWARE),1)
75 PVR_SYSTEM := rgx_nohw
76 # If we end up using dc_fbdev, Android always wants to be
77 # triple buffered in when running in pure-software mode.
78 DC_FBDEV_NUM_PREFERRED_BUFFERS := 3
80 ifeq ($(SUPPORT_ADF),1)
81 PVR_LDM_PLATFORM_PRE_REGISTERED := 1
84 PVR_SYSTEM := rgx_linux_apollo
85 SUPPORT_SYSTEM_INTERRUPT_HANDLING := 1
86 ION_DEFAULT_HEAP_ID_MASK := (1 << (ION_HEAP_TYPE_CUSTOM + 2))
90 TC_MEMORY_CONFIG := TC_MEMORY_LOCAL
91 SUPPORT_SYSTEM_INTERRUPT_HANDLING := 1
95 ifeq ($(SUPPORT_ADF),1)
96 ifneq ($(NO_HARDWARE),1)
97 DISPLAY_CONTROLLER ?= adf_pdp
100 ifeq ($(NO_HARDWARE),1)
101 DISPLAY_CONTROLLER ?= dc_example
103 DISPLAY_CONTROLLER ?= dc_pdp
107 ifeq ($(DISPLAY_CONTROLLER),adf_pdp)
108 ADF_PDP_WIDTH ?= 1280
109 ADF_PDP_HEIGHT ?= 720
110 KERNEL_COMPONENTS += apollo
113 KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER)
115 CACHEFLUSH_TYPE ?= CACHEFLUSH_X86
117 PVR_ANDROID_DEFER_CLEAR ?= 1
119 ifeq ($(PVR_SYSTEM),rgx_tc)
120 ifeq ($(TC_MEMORY_CONFIG),TC_MEMORY_LOCAL)
122 # Tell ion that we want memory from the test chip local memory
123 # heap. The choice of ION_HEAP_TYPE_CUSTOM+1 as the ID is
124 # arbitrary, but it has to match the one specified in the
125 # TC-specific ion support code.
126 ION_DEFAULT_HEAP_ID_MASK := 1 << (ION_HEAP_TYPE_CUSTOM + 1)
130 ifeq ($(DISPLAY_CONTROLLER),dc_pdp)
133 DCPDP_NO_INTERRUPTS ?= 1
136 include ../config/core.mk
137 include ../common/android/extra_config.mk
138 include ../common/pvrgdb.mk
139 include ../common/3rdparty.mk
140 include ../common/testchip.mk