soong_config: Allow extension of valid gralloc 1.0 buffer usage bits
* fw/native change I7f4174581e24e361577640b9263514a168ed482d
implemented validation of the buffer description info prior to
creating the descriptor. Some of our legacy devices need to
whitelist additional usage bits to support various functionality.
* The TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS variable can contain
a singular roll-up value (e.g., 0x02000000U), a left-shifted bit
(e.g., (1 << 25)), a bitwise OR of these things, or essentially
anything that the compiler can choke down.
Change-Id: I2127d33b03426b5e0f981aae837e07d82163fa17
diff --git a/build/soong/android/variable.go b/build/soong/android/variable.go
index c2bb782..5e992ca 100644
--- a/build/soong/android/variable.go
+++ b/build/soong/android/variable.go
@@ -1,5 +1,8 @@
package android
type Product_variables struct {
+ Additional_gralloc_10_usage_bits struct {
+ Cppflags []string
+ }
Has_legacy_camera_hal1 struct {
Cflags []string
}
@@ -25,6 +28,7 @@
}
type ProductVariables struct {
+ Additional_gralloc_10_usage_bits *string `json:",omitempty"`
Has_legacy_camera_hal1 *bool `json:",omitempty"`
Needs_text_relocations *bool `json:",omitempty"`
Specific_camera_parameter_library *string `json:",omitempty"`
diff --git a/build/soong/soong_config.mk b/build/soong/soong_config.mk
index 577d29d..accd467 100644
--- a/build/soong/soong_config.mk
+++ b/build/soong/soong_config.mk
@@ -3,6 +3,7 @@
_contents := $(_contents) "Lineage":{$(newline)
# See build/core/soong_config.mk for the add_json_* functions you can use here.
+$(call add_json_str_omitempty, Additional_gralloc_10_usage_bits, $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS))
$(call add_json_bool, Has_legacy_camera_hal1, $(filter true,$(TARGET_HAS_LEGACY_CAMERA_HAL1)))
$(call add_json_bool, Needs_text_relocations, $(filter true,$(TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS)))
$(call add_json_str, Specific_camera_parameter_library, $(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY))