blob: fb5a3081e07e2318be2dc2a860f9930e498c5c37 [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
Ethan Chenb7b49cc2019-06-22 19:57:57 -070061else ifeq ($(call is-board-platform-in-list, $(B64_FAMILY)),true)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070062 MSM_VIDC_TARGET_LIST := $(B64_FAMILY)
63 QCOM_HARDWARE_VARIANT := msm8994
Ethan Chenb7b49cc2019-06-22 19:57:57 -070064else ifeq ($(call is-board-platform-in-list, $(BR_FAMILY)),true)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070065 MSM_VIDC_TARGET_LIST := $(BR_FAMILY)
66 QCOM_HARDWARE_VARIANT := msm8916
Ethan Chenb7b49cc2019-06-22 19:57:57 -070067else ifeq ($(call is-board-platform-in-list, $(UM_3_18_FAMILY)),true)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070068 MSM_VIDC_TARGET_LIST := $(UM_3_18_FAMILY)
69 QCOM_HARDWARE_VARIANT := msm8996
Ethan Chenb7b49cc2019-06-22 19:57:57 -070070else ifeq ($(call is-board-platform-in-list, $(UM_4_4_FAMILY)),true)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070071 MSM_VIDC_TARGET_LIST := $(UM_4_4_FAMILY)
72 QCOM_HARDWARE_VARIANT := msm8998
Ethan Chenb7b49cc2019-06-22 19:57:57 -070073else ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true)
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070074 MSM_VIDC_TARGET_LIST := $(UM_4_9_FAMILY)
75 QCOM_HARDWARE_VARIANT := sdm845
76else
77 MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM)
78 QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
79endif
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070080
Rashed Abdel-Tawaba94cf0c2018-08-25 11:17:23 -070081PRODUCT_SOONG_NAMESPACES += \
82 hardware/qcom/audio-caf/$(QCOM_HARDWARE_VARIANT) \
83 hardware/qcom/display-caf/$(QCOM_HARDWARE_VARIANT) \
84 hardware/qcom/media-caf/$(QCOM_HARDWARE_VARIANT)
85
Rashed Abdel-Tawabb8ac1422018-08-25 11:10:25 -070086# QCOM HW crypto
87ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
88 TARGET_CRYPTFS_HW_PATH ?= vendor/qcom/opensource/cryptfs_hw
89endif