blob: 924fad5b074df80d9c931202e5699083a5fad54c [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
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -07004MSMNILE := msmnile #SM8150
5MSMSTEPPE := sm6150
6TRINKET := trinket #SM6125
TheHitMan7eb18aa62020-05-08 14:33:44 +05307ATOLL := atoll #SM6250
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -07008
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -07009B_FAMILY := msm8226 msm8610 msm8974
10B64_FAMILY := msm8992 msm8994
11BR_FAMILY := msm8909 msm8916
12UM_3_18_FAMILY := msm8937 msm8953 msm8996
13UM_4_4_FAMILY := msm8998 sdm660
Isaac Chen60912cf2018-10-03 15:29:15 +053014UM_4_9_FAMILY := sdm845 sdm710
TheHitMan7eb18aa62020-05-08 14:33:44 +053015UM_4_14_FAMILY := $(MSMNILE) $(MSMSTEPPE) $(TRINKET) $(ATOLL)
LuK1337b82776e2020-06-25 15:52:52 +020016UM_4_19_FAMILY := $(KONA) $(LITO)
17UM_PLATFORMS := $(UM_3_18_FAMILY) $(UM_4_4_FAMILY) $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070018
19BOARD_USES_ADRENO := true
20
21# UM platforms no longer need this set on O+
Ethan Chen66ce59c2019-06-22 13:30:38 -070022ifneq ($(filter $(B_FAMILY) $(B64_FAMILY) $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070023 TARGET_USES_QCOM_BSP := true
24endif
25
26# Tell HALs that we're compiling an AOSP build with an in-line kernel
27TARGET_COMPILE_WITH_MSM_KERNEL := true
28
29ifneq ($(filter msm7x27a msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
30 TARGET_USES_QCOM_BSP_LEGACY := true
31 # Enable legacy audio functions
32 ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
33 USE_CUSTOM_AUDIO_POLICY := 1
34 endif
35endif
36
37# Enable media extensions
38TARGET_USES_MEDIA_EXTENSIONS := true
39
40# Allow building audio encoders
41TARGET_USES_QCOM_MM_AUDIO := true
42
43# Enable color metadata for every UM platform
Ethan Chen66ce59c2019-06-22 13:30:38 -070044ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070045 TARGET_USES_COLOR_METADATA := true
46endif
47
48# Enable DRM PP driver on UM platforms that support it
LuK1337b82776e2020-06-25 15:52:52 +020049ifneq ($(filter $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070050 TARGET_USES_DRM_PP := true
51endif
52
Han Wang2838e8a2019-09-28 11:23:16 +020053# Mark GRALLOC_USAGE_HW_2D, GRALLOC_USAGE_EXTERNAL_DISP and GRALLOC_USAGE_PRIVATE_WFD as valid gralloc bits
Bruno Martins9717ee72018-12-28 21:34:03 +000054TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
Han Wang2838e8a2019-09-28 11:23:16 +020055TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 10)
56TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 13)
Bruno Martins9717ee72018-12-28 21:34:03 +000057TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 21)
58
Han Wang2838e8a2019-09-28 11:23:16 +020059# Mark GRALLOC_USAGE_PRIVATE_HEIF_VIDEO as valid gralloc bits on UM platforms that support it
LuK1337b82776e2020-06-25 15:52:52 +020060ifneq ($(filter $(UM_4_9_FAMILY) $(UM_4_14_FAMILY) $(UM_4_19_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Bruno Martins9717ee72018-12-28 21:34:03 +000061 TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 27)
62endif
63
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070064# List of targets that use master side content protection
LuK1337b82776e2020-06-25 15:52:52 +020065MASTER_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 -070066
Ethan Chen66ce59c2019-06-22 13:30:38 -070067ifneq ($(filter $(B_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070068 MSM_VIDC_TARGET_LIST := $(B_FAMILY)
69 QCOM_HARDWARE_VARIANT := msm8974
Ethan Chen66ce59c2019-06-22 13:30:38 -070070else ifneq ($(filter $(B64_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070071 MSM_VIDC_TARGET_LIST := $(B64_FAMILY)
72 QCOM_HARDWARE_VARIANT := msm8994
Ethan Chen66ce59c2019-06-22 13:30:38 -070073else ifneq ($(filter $(BR_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070074 MSM_VIDC_TARGET_LIST := $(BR_FAMILY)
75 QCOM_HARDWARE_VARIANT := msm8916
Ethan Chen66ce59c2019-06-22 13:30:38 -070076else ifneq ($(filter $(UM_3_18_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070077 MSM_VIDC_TARGET_LIST := $(UM_3_18_FAMILY)
78 QCOM_HARDWARE_VARIANT := msm8996
Ethan Chen66ce59c2019-06-22 13:30:38 -070079else ifneq ($(filter $(UM_4_4_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070080 MSM_VIDC_TARGET_LIST := $(UM_4_4_FAMILY)
81 QCOM_HARDWARE_VARIANT := msm8998
Ethan Chen66ce59c2019-06-22 13:30:38 -070082else ifneq ($(filter $(UM_4_9_FAMILY),$(TARGET_BOARD_PLATFORM)),)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070083 MSM_VIDC_TARGET_LIST := $(UM_4_9_FAMILY)
84 QCOM_HARDWARE_VARIANT := sdm845
Rashed Abdel-Tawab05aded82019-05-17 12:03:57 -070085else ifneq ($(filter $(UM_4_14_FAMILY),$(TARGET_BOARD_PLATFORM)),)
86 MSM_VIDC_TARGET_LIST := $(UM_4_14_FAMILY)
87 QCOM_HARDWARE_VARIANT := sm8150
LuK1337b82776e2020-06-25 15:52:52 +020088else ifneq ($(filter $(UM_4_19_FAMILY),$(TARGET_BOARD_PLATFORM)),)
89 MSM_VIDC_TARGET_LIST := $(UM_4_19_FAMILY)
90 QCOM_HARDWARE_VARIANT := sm8250
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070091else
92 MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM)
93 QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
94endif
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070095
Andrew Hexen8d08a5f2020-05-11 16:13:13 -070096# Allow a device to opt-out hardset of PRODUCT_SOONG_NAMESPACES
97QCOM_SOONG_NAMESPACE ?= hardware/qcom-caf/$(QCOM_HARDWARE_VARIANT)
98PRODUCT_SOONG_NAMESPACES += $(QCOM_SOONG_NAMESPACE)