RK3368 GPU version Rogue M 1.28
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / rogue_m / build / linux / pc_android / Makefile
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 include ../config/preconfig.mk
42
43 # If a TARGET_PRODUCT is specified but not a TARGET_DEVICE, try to
44 # derive the TARGET_DEVICE from TARGET_PRODUCT.
45 #
46 ifeq ($(TARGET_DEVICE),)
47 override TARGET_DEVICE := \
48  $(patsubst mini_%,%,$(patsubst full_%,%,$(TARGET_PRODUCT)))
49 endif
50
51 ifeq ($(TARGET_DEVICE),)
52 override TARGET_DEVICE := pc
53 endif
54
55 HAL_VARIANT := pc
56
57 RGX_BVNC ?= 1.82.4.5
58 # TC BONNIE:
59 #RGX_BVNC ?= 4.31.4.55
60
61 include ../common/android/paths.mk
62 include ../common/android/arch.mk
63 include ../common/android/features.mk
64
65 ifeq ($(SUPPORT_ADF),1)
66 ifneq ($(is_at_least_lollipop),1)
67 SYS_INCLUDES += \
68  -isystem $(ANDROID_ROOT)/device/img/pc/adf/libadf/include \
69  -isystem $(ANDROID_ROOT)/device/img/pc/adf/libadfhwc/include
70 endif
71 endif
72
73 ifeq ($(NO_HARDWARE),1)
74  LDM_PLATFORM := 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
79 else
80  ifeq ($(SUPPORT_ADF),1)
81   PVR_LDM_PLATFORM_PRE_REGISTERED := 1
82   LMA := 1
83   LDM_PLATFORM := 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))
87  else
88   LDM_PCI := 1
89   PVR_SYSTEM := rgx_tc
90   TC_MEMORY_CONFIG := TC_MEMORY_LOCAL
91   SUPPORT_SYSTEM_INTERRUPT_HANDLING := 1
92  endif
93 endif
94
95 ifeq ($(SUPPORT_ADF),1)
96  ifneq ($(NO_HARDWARE),1)
97   DISPLAY_CONTROLLER ?= adf_pdp
98  endif
99 else
100  ifeq ($(NO_HARDWARE),1)
101   DISPLAY_CONTROLLER ?= dc_example
102  else
103   DISPLAY_CONTROLLER ?= dc_pdp
104  endif
105 endif
106
107 ifeq ($(DISPLAY_CONTROLLER),adf_pdp)
108 ADF_PDP_WIDTH ?= 1280
109 ADF_PDP_HEIGHT ?= 720
110 KERNEL_COMPONENTS += apollo
111 endif
112
113 KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER)
114
115 CACHEFLUSH_TYPE ?= CACHEFLUSH_X86
116
117 PVR_ANDROID_DEFER_CLEAR ?= 1
118
119 ifeq ($(PVR_SYSTEM),rgx_tc)
120 ifeq ($(TC_MEMORY_CONFIG),TC_MEMORY_LOCAL)
121 LMA := 1
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)
127 endif
128 endif
129
130 ifeq ($(DISPLAY_CONTROLLER),dc_pdp)
131 DCPDP_WIDTH ?= 1280
132 DCPDP_HEIGHT ?= 720
133 DCPDP_NO_INTERRUPTS ?= 1
134 endif
135
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