From c842cd7587680bcfb1053c415b28fea4f5174731 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Tue, 16 May 2023 21:40:28 +0100 Subject: [PATCH] Hookup GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE The gralloc struct has been conditionally adjusted not to break blobs that use the old struct. So far only GRALLOC_HANDLE_HAS_RESERVED_SIZE was hooked up for Google Pixels, but it's now time to hook up the remaining flag. Change-Id: I175bd328bd9733b9487e349f7a8486f15ef0a450 --- build/soong/Android.bp | 17 +++++++++++++++++ config/BoardConfigSoong.mk | 3 +++ 2 files changed, 20 insertions(+) diff --git a/build/soong/Android.bp b/build/soong/Android.bp index 9453e6e1a..58d6f747b 100644 --- a/build/soong/Android.bp +++ b/build/soong/Android.bp @@ -88,6 +88,23 @@ gralloc_10_usage_bits { }, } +soong_config_module_type { + name: "gralloc_handle_custom_content_md_reserved_size", + module_type: "cc_defaults", + config_namespace: "customGlobalVars", + bool_variables: ["gralloc_handle_has_custom_content_md_reserved_size"], + properties: ["export_cflags"], +} + +gralloc_handle_custom_content_md_reserved_size { + name: "gralloc_handle_has_custom_content_md_reserved_size_defaults", + soong_config_variables: { + gralloc_handle_has_custom_content_md_reserved_size: { + export_cflags: ["-DGRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE"], + }, + }, +} + soong_config_module_type { name: "gralloc_handle_reserved_size", module_type: "cc_defaults", diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk index 94bfb7586..19437c55c 100644 --- a/config/BoardConfigSoong.mk +++ b/config/BoardConfigSoong.mk @@ -31,6 +31,7 @@ SOONG_CONFIG_customGlobalVars += \ aapt_version_code \ additional_gralloc_10_usage_bits \ bootloader_message_offset \ + gralloc_handle_has_custom_content_md_reserved_size \ gralloc_handle_has_reserved_size \ target_init_vendor_lib \ target_ld_shim_libs \ @@ -55,6 +56,7 @@ SOONG_CONFIG_customQcomVars += \ endif # Soong bool variables +SOONG_CONFIG_customGlobalVars_gralloc_handle_has_custom_content_md_reserved_size := $(TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE) SOONG_CONFIG_customGlobalVars_gralloc_handle_has_reserved_size := $(TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE) SOONG_CONFIG_customGlobalVars_uses_egl_display_array := $(TARGET_USES_EGL_DISPLAY_ARRAY) SOONG_CONFIG_customGlobalVars_uses_oplus_camera := $(TARGET_USES_OPLUS_CAMERA) @@ -66,6 +68,7 @@ SOONG_CONFIG_customQcomVars_uses_pre_uplink_features_netmgrd := $(TARGET_USES_PR # Set default values BOOTLOADER_MESSAGE_OFFSET ?= 0 TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0 +TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE ?= false TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE ?= false TARGET_INIT_VENDOR_LIB ?= vendor_init TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib