blob: 344ced84aa9202d2b930642dddabe79b1cc61228 [file] [log] [blame]
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -07001# Bring in Qualcomm helper macros
2include vendor/lineage/build/core/qcom_utils.mk
3
4B_FAMILY := msm8226 msm8610 msm8974
5B64_FAMILY := msm8992 msm8994
6BR_FAMILY := msm8909 msm8916
7UM_3_18_FAMILY := msm8937 msm8953 msm8996
8UM_4_4_FAMILY := msm8998 sdm660
9UM_4_9_FAMILY := sdm845
10UM_PLATFORMS := $(UM_3_18_FAMILY) $(UM_4_4_FAMILY) $(UM_4_9_FAMILY)
11
12BOARD_USES_ADRENO := true
13
14# UM platforms no longer need this set on O+
15ifneq ($(call is-board-platform-in-list, $(UM_PLATFORMS)),true)
16 TARGET_USES_QCOM_BSP := true
17endif
18
19# Tell HALs that we're compiling an AOSP build with an in-line kernel
20TARGET_COMPILE_WITH_MSM_KERNEL := true
21
22ifneq ($(filter msm7x27a msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
23 TARGET_USES_QCOM_BSP_LEGACY := true
24 # Enable legacy audio functions
25 ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
26 USE_CUSTOM_AUDIO_POLICY := 1
27 endif
28endif
29
30# Enable media extensions
31TARGET_USES_MEDIA_EXTENSIONS := true
32
33# Allow building audio encoders
34TARGET_USES_QCOM_MM_AUDIO := true
35
36# Enable color metadata for every UM platform
37ifeq ($(call is-board-platform-in-list, $(UM_PLATFORMS)),true)
38 TARGET_USES_COLOR_METADATA := true
39endif
40
41# Enable DRM PP driver on UM platforms that support it
42ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true)
43 TARGET_USES_DRM_PP := true
44endif
45
Bruno Martins9717ee72018-12-28 21:34:03 +000046# Mark GRALLOC_USAGE_PRIVATE_WFD as valid gralloc bits
47TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
48TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 21)
49
50# Mark GRALLOC_USAGE_PRIVATE_10BIT_TP as valid gralloc bits on UM platforms that support it
51ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true)
52 TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 27)
53endif
54
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070055# List of targets that use master side content protection
56MASTER_SIDE_CP_TARGET_LIST := msm8996 msm8998 sdm660 sdm845
57
58ifeq ($(call is-board-platform-in-list, $(B_FAMILY)),true)
59 MSM_VIDC_TARGET_LIST := $(B_FAMILY)
60 QCOM_HARDWARE_VARIANT := msm8974
61else
62ifeq ($(call is-board-platform-in-list, $(B64_FAMILY)),true)
63 MSM_VIDC_TARGET_LIST := $(B64_FAMILY)
64 QCOM_HARDWARE_VARIANT := msm8994
65else
66ifeq ($(call is-board-platform-in-list, $(BR_FAMILY)),true)
67 MSM_VIDC_TARGET_LIST := $(BR_FAMILY)
68 QCOM_HARDWARE_VARIANT := msm8916
69else
70ifeq ($(call is-board-platform-in-list, $(UM_3_18_FAMILY)),true)
71 MSM_VIDC_TARGET_LIST := $(UM_3_18_FAMILY)
72 QCOM_HARDWARE_VARIANT := msm8996
73else
74ifeq ($(call is-board-platform-in-list, $(UM_4_4_FAMILY)),true)
75 MSM_VIDC_TARGET_LIST := $(UM_4_4_FAMILY)
76 QCOM_HARDWARE_VARIANT := msm8998
77else
78ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true)
79 MSM_VIDC_TARGET_LIST := $(UM_4_9_FAMILY)
80 QCOM_HARDWARE_VARIANT := sdm845
81else
82 MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM)
83 QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
84endif
85endif
86endif
87endif
88endif
89endif
90
Rashed Abdel-Tawaba94cf0c2018-08-25 11:17:23 -070091PRODUCT_SOONG_NAMESPACES += \
92 hardware/qcom/audio-caf/$(QCOM_HARDWARE_VARIANT) \
93 hardware/qcom/display-caf/$(QCOM_HARDWARE_VARIANT) \
94 hardware/qcom/media-caf/$(QCOM_HARDWARE_VARIANT)
95
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070096# QCOM HW crypto
97ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
98 TARGET_CRYPTFS_HW_PATH ?= vendor/qcom/opensource/cryptfs_hw
99endif