blob: ab01fae913a45192b5935ff336479a7871e647ae [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
SahilSonar78169322022-02-09 11:44:09 +010010HOLI ?= holi #SM4350
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -070011
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070012B_FAMILY := msm8226 msm8610 msm8974
13B64_FAMILY := msm8992 msm8994
14BR_FAMILY := msm8909 msm8916
15UM_3_18_FAMILY := msm8937 msm8953 msm8996
16UM_4_4_FAMILY := msm8998 sdm660
Isaac Chen60912cf2018-10-03 15:29:15 +053017UM_4_9_FAMILY := sdm845 sdm710
TheHitMan7eb18aa62020-05-08 14:33:44 +053018UM_4_14_FAMILY := $(MSMNILE) $(MSMSTEPPE) $(TRINKET) $(ATOLL)
TheMalachite2652bdc2021-01-27 00:03:34 +010019UM_4_19_FAMILY := $(KONA) $(LITO) $(BENGAL)
SahilSonar78169322022-02-09 11:44:09 +010020UM_5_4_FAMILY := $(LAHAINA) $(HOLI)
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080021UM_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)
22QSSI_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 -070023
Albert Ia8fb6da2021-03-12 22:57:51 +053024ifeq ($(TARGET_USES_UM_4_19),true)
25 QSSI_SUPPORTED_PLATFORMS += $(TARGET_BOARD_PLATFORM)
26endif
27
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070028BOARD_USES_ADRENO := true
29
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080030# Add qtidisplay to soong config namespaces
31SOONG_CONFIG_NAMESPACES += qtidisplay
32
33# Add supported variables to qtidisplay config
34SOONG_CONFIG_qtidisplay += \
35 drmpp \
36 headless \
37 llvmsa \
38 gralloc4 \
Alexander Koskovich00ddf842022-03-14 08:49:58 -070039 udfps \
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080040 default
41
42# Set default values for qtidisplay config
43SOONG_CONFIG_qtidisplay_drmpp ?= false
44SOONG_CONFIG_qtidisplay_headless ?= false
45SOONG_CONFIG_qtidisplay_llvmsa ?= false
46SOONG_CONFIG_qtidisplay_gralloc4 ?= false
Alexander Koskovich00ddf842022-03-14 08:49:58 -070047SOONG_CONFIG_qtidisplay_udfps ?= false
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080048SOONG_CONFIG_qtidisplay_default ?= true
49
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070050# UM platforms no longer need this set on O+
Ethan Chen66ce59c2019-06-22 13:30:38 -070051ifneq ($(filter $(B_FAMILY) $(B64_FAMILY) $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070052 TARGET_USES_QCOM_BSP := true
53endif
54
55# Tell HALs that we're compiling an AOSP build with an in-line kernel
56TARGET_COMPILE_WITH_MSM_KERNEL := true
57
58ifneq ($(filter msm7x27a msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
59 TARGET_USES_QCOM_BSP_LEGACY := true
60 # Enable legacy audio functions
61 ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
62 USE_CUSTOM_AUDIO_POLICY := 1
63 endif
64endif
65
66# Enable media extensions
67TARGET_USES_MEDIA_EXTENSIONS := true
68
69# Allow building audio encoders
70TARGET_USES_QCOM_MM_AUDIO := true
71
72# Enable color metadata for every UM platform
Ethan Chen66ce59c2019-06-22 13:30:38 -070073ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070074 TARGET_USES_COLOR_METADATA := true
75endif
76
77# Enable DRM PP driver on UM platforms that support it
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080078ifneq ($(filter $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY) $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
79 SOONG_CONFIG_qtidisplay_drmpp := true
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070080 TARGET_USES_DRM_PP := true
81endif
82
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +080083# Enable Gralloc4 on UM platforms that support it
84ifneq ($(filter $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
85 SOONG_CONFIG_qtidisplay_gralloc4 := true
86endif
87
Bruno Martins9717ee72018-12-28 21:34:03 +000088TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
Michael Bestasaed187c2021-01-13 23:08:35 +020089
90# Mark GRALLOC_USAGE_HW_2D as valid gralloc bit on legacy platforms that support it
91ifneq ($(filter msm8960 msm8952 $(B_FAMILY) $(B64_FAMILY) $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
92 TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 10)
93endif
94
95# Mark GRALLOC_USAGE_EXTERNAL_DISP as valid gralloc bit
Han Wang2838e8a2019-09-28 11:23:16 +020096TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 13)
Michael Bestasaed187c2021-01-13 23:08:35 +020097
98# Mark GRALLOC_USAGE_PRIVATE_WFD as valid gralloc bit
Bruno Martins9717ee72018-12-28 21:34:03 +000099TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 21)
100
Michael Bestasaed187c2021-01-13 23:08:35 +0200101# Mark GRALLOC_USAGE_PRIVATE_HEIF_VIDEO as valid gralloc bit on UM platforms that support it
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +0800102ifneq ($(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 +0000103 TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 27)
104endif
105
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700106# List of targets that use master side content protection
Arian8d6f5962022-04-04 14:32:31 +0200107MASTER_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 -0700108
Ethan Chen66ce59c2019-06-22 13:30:38 -0700109ifneq ($(filter $(B_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700110 MSM_VIDC_TARGET_LIST := $(B_FAMILY)
111 QCOM_HARDWARE_VARIANT := msm8974
Ethan Chen66ce59c2019-06-22 13:30:38 -0700112else ifneq ($(filter $(B64_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700113 MSM_VIDC_TARGET_LIST := $(B64_FAMILY)
114 QCOM_HARDWARE_VARIANT := msm8994
Ethan Chen66ce59c2019-06-22 13:30:38 -0700115else ifneq ($(filter $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700116 MSM_VIDC_TARGET_LIST := $(BR_FAMILY)
117 QCOM_HARDWARE_VARIANT := msm8916
Ethan Chen66ce59c2019-06-22 13:30:38 -0700118else ifneq ($(filter $(UM_3_18_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700119 MSM_VIDC_TARGET_LIST := $(UM_3_18_FAMILY)
120 QCOM_HARDWARE_VARIANT := msm8996
Ethan Chen66ce59c2019-06-22 13:30:38 -0700121else ifneq ($(filter $(UM_4_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700122 MSM_VIDC_TARGET_LIST := $(UM_4_4_FAMILY)
123 QCOM_HARDWARE_VARIANT := msm8998
Ethan Chen66ce59c2019-06-22 13:30:38 -0700124else ifneq ($(filter $(UM_4_9_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700125 MSM_VIDC_TARGET_LIST := $(UM_4_9_FAMILY)
126 QCOM_HARDWARE_VARIANT := sdm845
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -0700127else ifneq ($(filter $(UM_4_14_FAMILY),$(TARGET_BOARD_PLATFORM)),)
128 MSM_VIDC_TARGET_LIST := $(UM_4_14_FAMILY)
129 QCOM_HARDWARE_VARIANT := sm8150
LuK1337b82776e2020-06-25 15:52:52 +0200130else ifneq ($(filter $(UM_4_19_FAMILY),$(TARGET_BOARD_PLATFORM)),)
131 MSM_VIDC_TARGET_LIST := $(UM_4_19_FAMILY)
132 QCOM_HARDWARE_VARIANT := sm8250
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +0800133else ifneq ($(filter $(UM_5_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
JamieHoSzeYuib4264ef2021-03-17 14:44:44 +0800134 QCOM_HARDWARE_VARIANT := sm8350
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700135else
136 MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM)
137 QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
138endif
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -0700139
Andrew Hexen8d08a5f2020-05-11 16:13:13 -0700140# Allow a device to opt-out hardset of PRODUCT_SOONG_NAMESPACES
141QCOM_SOONG_NAMESPACE ?= hardware/qcom-caf/$(QCOM_HARDWARE_VARIANT)
142PRODUCT_SOONG_NAMESPACES += $(QCOM_SOONG_NAMESPACE)
LuK1337a1588f42020-10-30 13:32:49 +0100143
LuK1337743ecee2022-01-26 21:27:34 +0100144# Add display-commonsys to PRODUCT_SOONG_NAMESPACES for QSSI supported platforms
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100145ifneq ($(filter $(QSSI_SUPPORTED_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
Arian84c8b552021-12-03 18:35:22 +0100146PRODUCT_SOONG_NAMESPACES += \
LuK1337743ecee2022-01-26 21:27:34 +0100147 vendor/qcom/opensource/commonsys/display \
Arian84c8b552021-12-03 18:35:22 +0100148 vendor/qcom/opensource/commonsys-intf/display \
149 vendor/qcom/opensource/display
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100150endif
151
LuK1337a1588f42020-10-30 13:32:49 +0100152# Add data-ipa-cfg-mgr to PRODUCT_SOONG_NAMESPACES if needed
153ifneq ($(USE_DEVICE_SPECIFIC_DATA_IPA_CFG_MGR),true)
154 PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/data-ipa-cfg-mgr
155endif
Pig033b4402020-09-19 08:44:33 +0800156
Michael Bestas91cbf5f2020-12-30 21:58:08 +0200157# Add dataservices to PRODUCT_SOONG_NAMESPACES if needed
158ifneq ($(USE_DEVICE_SPECIFIC_DATASERVICES),true)
159 PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/dataservices
160endif