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
This commit is contained in:
Kevin F. Haggerty
2018-08-25 20:23:19 -06:00
committed by Bruno Martins
parent 403a0ad3d8
commit 59009f8a5e
2 changed files with 5 additions and 0 deletions

View File

@@ -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 Product_variables struct {
}
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"`

View File

@@ -3,6 +3,7 @@ add_json_str_omitempty = $(if $(strip $(2)),$(call add_json_str, $(1), $(2)))
_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))