blob: ee98cf237f1483ed76c335a7115eacc6e28a876d [file] [log] [blame]
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -07001# Platform names
LuK1337b82776e2020-06-25 15:52:52 +02002KONA := kona #SM8250
3LITO := lito #SM7250
TheMalachite2652bdc2021-01-27 00:03:34 +01004BENGAL := bengal #SM6115
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -07005MSMNILE := msmnile #SM8150
6MSMSTEPPE := sm6150
7TRINKET := trinket #SM6125
TheHitMan7eb18aa62020-05-08 14:33:44 +05308ATOLL := atoll #SM6250
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +08009LAHAINA ?= lahaina #SM8350
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -070010
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070011B_FAMILY := msm8226 msm8610 msm8974
12B64_FAMILY := msm8992 msm8994
13BR_FAMILY := msm8909 msm8916
14UM_3_18_FAMILY := msm8937 msm8953 msm8996
15UM_4_4_FAMILY := msm8998 sdm660
Isaac Chen60912cf2018-10-03 15:29:15 +053016UM_4_9_FAMILY := sdm845 sdm710
TheHitMan7eb18aa62020-05-08 14:33:44 +053017UM_4_14_FAMILY := $(MSMNILE) $(MSMSTEPPE) $(TRINKET) $(ATOLL)
TheMalachite2652bdc2021-01-27 00:03:34 +010018UM_4_19_FAMILY := $(KONA) $(LITO) $(BENGAL)
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080019UM_5_4_FAMILY := $(LAHAINA)
20UM_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)
21QSSI_SUPPORTED_PLATFORMS := $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY) $(UM_5_4_FAMILY)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070022
Albert Ia8fb6da2021-03-12 22:57:51 +053023ifeq ($(TARGET_USES_UM_4_19),true)
24 QSSI_SUPPORTED_PLATFORMS += $(TARGET_BOARD_PLATFORM)
25endif
26
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070027BOARD_USES_ADRENO := true
28
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080029# Add qtidisplay to soong config namespaces
30SOONG_CONFIG_NAMESPACES += qtidisplay
31
32# Add supported variables to qtidisplay config
33SOONG_CONFIG_qtidisplay += \
34 drmpp \
35 headless \
36 llvmsa \
37 gralloc4 \
Alexander Koskovich00ddf842022-03-14 08:49:58 -070038 udfps \
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080039 default
40
41# Set default values for qtidisplay config
42SOONG_CONFIG_qtidisplay_drmpp ?= false
43SOONG_CONFIG_qtidisplay_headless ?= false
44SOONG_CONFIG_qtidisplay_llvmsa ?= false
45SOONG_CONFIG_qtidisplay_gralloc4 ?= false
Alexander Koskovich00ddf842022-03-14 08:49:58 -070046SOONG_CONFIG_qtidisplay_udfps ?= false
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080047SOONG_CONFIG_qtidisplay_default ?= true
48
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070049# UM platforms no longer need this set on O+
Ethan Chen66ce59c2019-06-22 13:30:38 -070050ifneq ($(filter $(B_FAMILY) $(B64_FAMILY) $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070051 TARGET_USES_QCOM_BSP := true
52endif
53
54# Tell HALs that we're compiling an AOSP build with an in-line kernel
55TARGET_COMPILE_WITH_MSM_KERNEL := true
56
57ifneq ($(filter msm7x27a msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
58 TARGET_USES_QCOM_BSP_LEGACY := true
59 # Enable legacy audio functions
60 ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
61 USE_CUSTOM_AUDIO_POLICY := 1
62 endif
63endif
64
65# Enable media extensions
66TARGET_USES_MEDIA_EXTENSIONS := true
67
68# Allow building audio encoders
69TARGET_USES_QCOM_MM_AUDIO := true
70
71# Enable color metadata for every UM platform
Ethan Chen66ce59c2019-06-22 13:30:38 -070072ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070073 TARGET_USES_COLOR_METADATA := true
74endif
75
76# Enable DRM PP driver on UM platforms that support it
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080077ifneq ($(filter $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY) $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
78 SOONG_CONFIG_qtidisplay_drmpp := true
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070079 TARGET_USES_DRM_PP := true
80endif
81
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080082# Enable Gralloc4 on UM platforms that support it
83ifneq ($(filter $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
84 SOONG_CONFIG_qtidisplay_gralloc4 := true
85endif
86
Bruno Martins9717ee72018-12-28 21:34:03 +000087TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
Michael Bestasaed187c2021-01-13 23:08:35 +020088
89# Mark GRALLOC_USAGE_HW_2D as valid gralloc bit on legacy platforms that support it
90ifneq ($(filter msm8960 msm8952 $(B_FAMILY) $(B64_FAMILY) $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
91 TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 10)
92endif
93
94# Mark GRALLOC_USAGE_EXTERNAL_DISP as valid gralloc bit
Han Wang2838e8a2019-09-28 11:23:16 +020095TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 13)
Michael Bestasaed187c2021-01-13 23:08:35 +020096
97# Mark GRALLOC_USAGE_PRIVATE_WFD as valid gralloc bit
Bruno Martins9717ee72018-12-28 21:34:03 +000098TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 21)
99
Michael Bestasaed187c2021-01-13 23:08:35 +0200100# Mark GRALLOC_USAGE_PRIVATE_HEIF_VIDEO as valid gralloc bit on UM platforms that support it
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +0800101ifneq ($(filter $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY) $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Bruno Martins9717ee72018-12-28 21:34:03 +0000102 TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 27)
103endif
104
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700105# List of targets that use master side content protection
Arian8d6f5962022-04-04 14:32:31 +0200106MASTER_SIDE_CP_TARGET_LIST := msm8996 $(UM_4_4_FAMILY) $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700107
Ethan Chen66ce59c2019-06-22 13:30:38 -0700108ifneq ($(filter $(B_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700109 MSM_VIDC_TARGET_LIST := $(B_FAMILY)
110 QCOM_HARDWARE_VARIANT := msm8974
Ethan Chen66ce59c2019-06-22 13:30:38 -0700111else ifneq ($(filter $(B64_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700112 MSM_VIDC_TARGET_LIST := $(B64_FAMILY)
113 QCOM_HARDWARE_VARIANT := msm8994
Ethan Chen66ce59c2019-06-22 13:30:38 -0700114else ifneq ($(filter $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700115 MSM_VIDC_TARGET_LIST := $(BR_FAMILY)
116 QCOM_HARDWARE_VARIANT := msm8916
Ethan Chen66ce59c2019-06-22 13:30:38 -0700117else ifneq ($(filter $(UM_3_18_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700118 MSM_VIDC_TARGET_LIST := $(UM_3_18_FAMILY)
119 QCOM_HARDWARE_VARIANT := msm8996
Ethan Chen66ce59c2019-06-22 13:30:38 -0700120else ifneq ($(filter $(UM_4_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700121 MSM_VIDC_TARGET_LIST := $(UM_4_4_FAMILY)
122 QCOM_HARDWARE_VARIANT := msm8998
Ethan Chen66ce59c2019-06-22 13:30:38 -0700123else ifneq ($(filter $(UM_4_9_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700124 MSM_VIDC_TARGET_LIST := $(UM_4_9_FAMILY)
125 QCOM_HARDWARE_VARIANT := sdm845
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -0700126else ifneq ($(filter $(UM_4_14_FAMILY),$(TARGET_BOARD_PLATFORM)),)
127 MSM_VIDC_TARGET_LIST := $(UM_4_14_FAMILY)
128 QCOM_HARDWARE_VARIANT := sm8150
LuK1337b82776e2020-06-25 15:52:52 +0200129else ifneq ($(filter $(UM_4_19_FAMILY),$(TARGET_BOARD_PLATFORM)),)
130 MSM_VIDC_TARGET_LIST := $(UM_4_19_FAMILY)
131 QCOM_HARDWARE_VARIANT := sm8250
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +0800132else ifneq ($(filter $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +0800133 QCOM_HARDWARE_VARIANT := sm8350
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700134else
135 MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM)
136 QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
137endif
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700138
Andrew Hexen8d08a5f2020-05-11 16:13:13 -0700139# Allow a device to opt-out hardset of PRODUCT_SOONG_NAMESPACES
140QCOM_SOONG_NAMESPACE ?= hardware/qcom-caf/$(QCOM_HARDWARE_VARIANT)
141PRODUCT_SOONG_NAMESPACES += $(QCOM_SOONG_NAMESPACE)
LuK1337a1588f42020-10-30 13:32:49 +0100142
LuK1337743ecee2022-01-26 21:27:34 +0100143# Add display-commonsys to PRODUCT_SOONG_NAMESPACES for QSSI supported platforms
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100144ifneq ($(filter $(QSSI_SUPPORTED_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
Arian84c8b552021-12-03 18:35:22 +0100145PRODUCT_SOONG_NAMESPACES += \
LuK1337743ecee2022-01-26 21:27:34 +0100146 vendor/qcom/opensource/commonsys/display \
Arian84c8b552021-12-03 18:35:22 +0100147 vendor/qcom/opensource/commonsys-intf/display \
148 vendor/qcom/opensource/display
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100149endif
150
LuK1337a1588f42020-10-30 13:32:49 +0100151# Add data-ipa-cfg-mgr to PRODUCT_SOONG_NAMESPACES if needed
152ifneq ($(USE_DEVICE_SPECIFIC_DATA_IPA_CFG_MGR),true)
153 PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/data-ipa-cfg-mgr
154endif
Pig033b4402020-09-19 08:44:33 +0800155
Michael Bestas91cbf5f2020-12-30 21:58:08 +0200156# Add dataservices to PRODUCT_SOONG_NAMESPACES if needed
157ifneq ($(USE_DEVICE_SPECIFIC_DATASERVICES),true)
158 PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/dataservices
159endif
160
Pig033b4402020-09-19 08:44:33 +0800161ifeq ($(TARGET_USE_QTI_BT_STACK),true)
162PRODUCT_SOONG_NAMESPACES += \
163 vendor/qcom/opensource/commonsys/packages/apps/Bluetooth \
Pigd3382362022-01-15 20:15:44 -0500164 vendor/qcom/opensource/commonsys/system/bt/conf \
165 vendor/qcom/opensource/commonsys/system/bt/main
Pig033b4402020-09-19 08:44:33 +0800166endif #TARGET_USE_QTI_BT_STACK