-
Notifications
You must be signed in to change notification settings - Fork 59
/
BoardConfigQcom.mk
212 lines (176 loc) · 7.16 KB
/
BoardConfigQcom.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
include hardware/qcom-caf/common/qcom_boards.mk
include hardware/qcom-caf/common/qcom_defs.mk
UM_3_18_HAL_FAMILY := msm8996
UM_4_4_HAL_FAMILY := msm8998
ifeq (,$(TARGET_ENFORCES_QSSI))
UM_3_18_HAL_FAMILY += msm8937 msm8953
UM_4_4_HAL_FAMILY += sdm660
else
UM_4_9_LEGACY_FAMILY := msm8937 msm8953
UM_4_19_LEGACY_FAMILY := sdm660
endif
UM_PLATFORMS := \
$(UM_3_18_FAMILY) \
$(UM_4_4_FAMILY) \
$(UM_4_9_FAMILY) \
$(UM_4_14_FAMILY) \
$(UM_4_19_FAMILY) \
$(UM_5_4_FAMILY) \
$(UM_5_10_FAMILY) \
$(UM_5_15_FAMILY)
LEGACY_UM_PLATFORMS := \
$(UM_3_18_FAMILY) \
$(UM_4_4_FAMILY) \
$(UM_4_9_FAMILY) \
$(UM_4_14_FAMILY) \
$(UM_4_19_FAMILY) \
$(UM_5_4_FAMILY)
QSSI_SUPPORTED_PLATFORMS := \
$(UM_4_9_LEGACY_FAMILY) \
$(UM_4_19_LEGACY_FAMILY) \
$(UM_4_9_FAMILY) \
$(UM_4_14_FAMILY) \
$(UM_4_19_FAMILY) \
$(UM_5_4_FAMILY) \
$(UM_5_10_FAMILY) \
$(UM_5_15_FAMILY)
BOARD_USES_ADRENO := true
# Vibrator HAL
$(call soong_config_set, vibrator, vibratortargets, vibratoraidlV2target)
# Add qtidisplay to soong config namespaces
SOONG_CONFIG_NAMESPACES += qtidisplay
# Add supported variables to qtidisplay config
SOONG_CONFIG_qtidisplay += \
drmpp \
headless \
llvmsa \
gralloc4 \
displayconfig_enabled \
udfps \
default \
var1 \
var2 \
var3
# Set default values for qtidisplay config
SOONG_CONFIG_qtidisplay_drmpp ?= false
SOONG_CONFIG_qtidisplay_headless ?= false
SOONG_CONFIG_qtidisplay_llvmsa ?= false
SOONG_CONFIG_qtidisplay_gralloc4 ?= false
SOONG_CONFIG_qtidisplay_displayconfig_enabled ?= false
SOONG_CONFIG_qtidisplay_udfps ?= false
SOONG_CONFIG_qtidisplay_default ?= true
SOONG_CONFIG_qtidisplay_var1 ?= false
SOONG_CONFIG_qtidisplay_var2 ?= false
SOONG_CONFIG_qtidisplay_var3 ?= false
# Add rmnetctl to soong config namespaces
SOONG_CONFIG_NAMESPACES += rmnetctl
# Add supported variables to rmnetctl config
SOONG_CONFIG_rmnetctl += \
old_rmnet_data
# Set default values for rmnetctl config
SOONG_CONFIG_rmnetctl_old_rmnet_data ?= false
# Tell HALs that we're compiling an AOSP build with an in-line kernel
TARGET_COMPILE_WITH_MSM_KERNEL := true
# Enable media extensions
TARGET_USES_MEDIA_EXTENSIONS := true
# Allow building audio encoders
TARGET_USES_QCOM_MM_AUDIO := true
# Enable color metadata
TARGET_USES_COLOR_METADATA := true
# Enable DRM PP driver on UM platforms that support it
ifneq ($(filter $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY) $(UM_5_4_FAMILY) $(UM_5_10_FAMILY) $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
SOONG_CONFIG_qtidisplay_drmpp := true
TARGET_USES_DRM_PP := true
endif
# Enable Gralloc4 on UM platforms that support it
ifneq ($(filter $(UM_5_4_FAMILY) $(UM_5_10_FAMILY) $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
SOONG_CONFIG_qtidisplay_gralloc4 := true
endif
# Select AR variant of A-HAL dependencies
ifneq ($(filter $(UM_5_10_FAMILY) $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
TARGET_USES_QCOM_AUDIO_AR ?= true
endif
# Enable displayconfig on every UM platform
ifeq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
SOONG_CONFIG_qtidisplay_displayconfig_enabled := true
endif
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
# Mark GRALLOC_USAGE_EXTERNAL_DISP as valid gralloc bit
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 13)
# Mark GRALLOC_USAGE_PRIVATE_WFD as valid gralloc bit
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 21)
# Mark GRALLOC_USAGE_PRIVATE_HEIF_VIDEO as valid gralloc bit on UM platforms that support it
ifneq ($(filter $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY) $(UM_5_4_FAMILY) $(UM_5_10_FAMILY) $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 27)
endif
# List of targets that use master side content protection
MASTER_SIDE_CP_TARGET_LIST := msm8996 $(UM_4_4_FAMILY) $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY)
# Opt-in for old rmnet_data driver
ifeq ($(filter $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
SOONG_CONFIG_rmnetctl_old_rmnet_data := true
endif
# Use full QTI gralloc struct for GKI 2.0 targets
ifneq ($(filter $(UM_5_10_FAMILY) $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE ?= true
TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE ?= true
endif
ifneq ($(filter $(UM_3_18_HAL_FAMILY),$(TARGET_BOARD_PLATFORM)),)
MSM_VIDC_TARGET_LIST := $(UM_3_18_HAL_FAMILY)
QCOM_HARDWARE_VARIANT := msm8996
else ifneq ($(filter $(UM_4_9_LEGACY_FAMILY),$(TARGET_BOARD_PLATFORM)),)
MSM_VIDC_TARGET_LIST := $(UM_4_9_LEGACY_FAMILY)
QCOM_HARDWARE_VARIANT := msm8953
else ifneq ($(filter $(UM_4_4_HAL_FAMILY),$(TARGET_BOARD_PLATFORM)),)
MSM_VIDC_TARGET_LIST := $(UM_4_4_HAL_FAMILY)
QCOM_HARDWARE_VARIANT := msm8998
else ifneq ($(filter $(UM_4_19_LEGACY_FAMILY),$(TARGET_BOARD_PLATFORM)),)
MSM_VIDC_TARGET_LIST := $(UM_4_19_LEGACY_FAMILY)
QCOM_HARDWARE_VARIANT := sdm660
else ifneq ($(filter $(UM_4_9_FAMILY),$(TARGET_BOARD_PLATFORM)),)
MSM_VIDC_TARGET_LIST := $(UM_4_9_FAMILY)
QCOM_HARDWARE_VARIANT := sdm845
else ifneq ($(filter $(UM_4_14_FAMILY),$(TARGET_BOARD_PLATFORM)),)
MSM_VIDC_TARGET_LIST := $(UM_4_14_FAMILY)
QCOM_HARDWARE_VARIANT := sm8150
else ifneq ($(filter $(UM_4_19_FAMILY),$(TARGET_BOARD_PLATFORM)),)
MSM_VIDC_TARGET_LIST := $(UM_4_19_FAMILY)
QCOM_HARDWARE_VARIANT := sm8250
else ifneq ($(filter $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
QCOM_HARDWARE_VARIANT := sm8350
else ifneq ($(filter $(UM_5_10_FAMILY),$(TARGET_BOARD_PLATFORM)),)
QCOM_HARDWARE_VARIANT := sm8450
else ifneq ($(filter $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
QCOM_HARDWARE_VARIANT := sm8550
else
MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM)
QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
endif
# Allow a device to opt-out hardset of PRODUCT_SOONG_NAMESPACES
QCOM_SOONG_NAMESPACE ?= hardware/qcom-caf/$(QCOM_HARDWARE_VARIANT)
PRODUCT_SOONG_NAMESPACES += $(QCOM_SOONG_NAMESPACE)
# Add display-commonsys to PRODUCT_SOONG_NAMESPACES for QSSI supported platforms
ifneq ($(filter $(QSSI_SUPPORTED_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
PRODUCT_SOONG_NAMESPACES += \
vendor/qcom/opensource/commonsys/display \
vendor/qcom/opensource/commonsys-intf/display
ifeq ($(filter $(UM_5_10_FAMILY) $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
PRODUCT_SOONG_NAMESPACES += \
vendor/qcom/opensource/display
endif
endif
# Add data-ipa-cfg-mgr to PRODUCT_SOONG_NAMESPACES if needed
ifneq ($(USE_DEVICE_SPECIFIC_DATA_IPA_CFG_MGR),true)
ifneq ($(filter $(LEGACY_UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/data-ipa-cfg-mgr-legacy-um
else ifneq ($(filter $(UM_5_10_FAMILY),$(TARGET_BOARD_PLATFORM)),)
PRODUCT_SOONG_NAMESPACES += hardware/qcom-caf/sm8450/data-ipa-cfg-mgr
else ifneq ($(filter $(UM_5_15_FAMILY),$(TARGET_BOARD_PLATFORM)),)
PRODUCT_SOONG_NAMESPACES += hardware/qcom-caf/sm8550/data-ipa-cfg-mgr
endif
endif
# Add dataservices to PRODUCT_SOONG_NAMESPACES if needed
ifneq ($(USE_DEVICE_SPECIFIC_DATASERVICES),true)
PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/dataservices
endif
# Add wlan to PRODUCT_SOONG_NAMESPACES
PRODUCT_SOONG_NAMESPACES += hardware/qcom-caf/wlan