Rashed Abdel-Tawab | b8ac142 | 2018-08-25 11:10:25 -0700 | [diff] [blame] | 1 | # Bring in Qualcomm helper macros |
| 2 | include vendor/lineage/build/core/qcom_utils.mk |
| 3 | |
| 4 | B_FAMILY := msm8226 msm8610 msm8974 |
| 5 | B64_FAMILY := msm8992 msm8994 |
| 6 | BR_FAMILY := msm8909 msm8916 |
| 7 | UM_3_18_FAMILY := msm8937 msm8953 msm8996 |
| 8 | UM_4_4_FAMILY := msm8998 sdm660 |
| 9 | UM_4_9_FAMILY := sdm845 |
| 10 | UM_PLATFORMS := $(UM_3_18_FAMILY) $(UM_4_4_FAMILY) $(UM_4_9_FAMILY) |
| 11 | |
| 12 | BOARD_USES_ADRENO := true |
| 13 | |
| 14 | # UM platforms no longer need this set on O+ |
| 15 | ifneq ($(call is-board-platform-in-list, $(UM_PLATFORMS)),true) |
| 16 | TARGET_USES_QCOM_BSP := true |
| 17 | endif |
| 18 | |
| 19 | # Tell HALs that we're compiling an AOSP build with an in-line kernel |
| 20 | TARGET_COMPILE_WITH_MSM_KERNEL := true |
| 21 | |
| 22 | ifneq ($(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 |
| 28 | endif |
| 29 | |
| 30 | # Enable media extensions |
| 31 | TARGET_USES_MEDIA_EXTENSIONS := true |
| 32 | |
| 33 | # Allow building audio encoders |
| 34 | TARGET_USES_QCOM_MM_AUDIO := true |
| 35 | |
| 36 | # Enable color metadata for every UM platform |
| 37 | ifeq ($(call is-board-platform-in-list, $(UM_PLATFORMS)),true) |
| 38 | TARGET_USES_COLOR_METADATA := true |
| 39 | endif |
| 40 | |
| 41 | # Enable DRM PP driver on UM platforms that support it |
| 42 | ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true) |
| 43 | TARGET_USES_DRM_PP := true |
| 44 | endif |
| 45 | |
Bruno Martins | 9717ee7 | 2018-12-28 21:34:03 +0000 | [diff] [blame] | 46 | # Mark GRALLOC_USAGE_PRIVATE_WFD as valid gralloc bits |
| 47 | TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0 |
| 48 | TARGET_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 |
| 51 | ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true) |
| 52 | TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 27) |
| 53 | endif |
| 54 | |
Rashed Abdel-Tawab | b8ac142 | 2018-08-25 11:10:25 -0700 | [diff] [blame] | 55 | # List of targets that use master side content protection |
| 56 | MASTER_SIDE_CP_TARGET_LIST := msm8996 msm8998 sdm660 sdm845 |
| 57 | |
| 58 | ifeq ($(call is-board-platform-in-list, $(B_FAMILY)),true) |
| 59 | MSM_VIDC_TARGET_LIST := $(B_FAMILY) |
| 60 | QCOM_HARDWARE_VARIANT := msm8974 |
| 61 | else |
| 62 | ifeq ($(call is-board-platform-in-list, $(B64_FAMILY)),true) |
| 63 | MSM_VIDC_TARGET_LIST := $(B64_FAMILY) |
| 64 | QCOM_HARDWARE_VARIANT := msm8994 |
| 65 | else |
| 66 | ifeq ($(call is-board-platform-in-list, $(BR_FAMILY)),true) |
| 67 | MSM_VIDC_TARGET_LIST := $(BR_FAMILY) |
| 68 | QCOM_HARDWARE_VARIANT := msm8916 |
| 69 | else |
| 70 | ifeq ($(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 |
| 73 | else |
| 74 | ifeq ($(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 |
| 77 | else |
| 78 | ifeq ($(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 |
| 81 | else |
| 82 | MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM) |
| 83 | QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM) |
| 84 | endif |
| 85 | endif |
| 86 | endif |
| 87 | endif |
| 88 | endif |
| 89 | endif |
| 90 | |
Rashed Abdel-Tawab | a94cf0c | 2018-08-25 11:17:23 -0700 | [diff] [blame] | 91 | PRODUCT_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-Tawab | b8ac142 | 2018-08-25 11:10:25 -0700 | [diff] [blame] | 96 | # QCOM HW crypto |
| 97 | ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
| 98 | TARGET_CRYPTFS_HW_PATH ?= vendor/qcom/opensource/cryptfs_hw |
| 99 | endif |