From 0fddf7d4a323917438f2fa475e25e0f0fccf1336 Mon Sep 17 00:00:00 2001 From: SeYeong Byeon Date: Wed, 7 Oct 2020 16:04:38 +0900 Subject: gralloc4: initial code Bug: 173320140 Test: Builds successfully with gralloc3 and gralloc4 Test: Device boots to home with gralloc3 No-Typo-Check: Typos in comments from upstream Signed-off-by: SeYeong Byeon Change-Id: I1df105fd0358a0d1ee9c0266acafc4f7192ebc92 --- gralloc4/Android.bp | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 gralloc4/Android.bp (limited to 'gralloc4/Android.bp') diff --git a/gralloc4/Android.bp b/gralloc4/Android.bp new file mode 100644 index 0000000..60750d4 --- /dev/null +++ b/gralloc4/Android.bp @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2020 Arm Limited. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +soong_config_module_type { + name: "arm_gralloc_cc_defaults", + module_type: "cc_defaults", + config_namespace: "arm_gralloc", + variables: [ + "mali_display_version", + "gralloc_hwc_force_bgra_8888", + "gralloc_hwc_fb_disable_afbc", + "gralloc_camera_write_raw16", + ], + properties: [ + "cflags", + ], +} + +soong_config_string_variable { + name: "mali_display_version", + values: [ + "v0", + "v500", + "v550", + "v650", + "v71", + ], +} + +soong_config_bool_variable { + name: "gralloc_hwc_force_bgra_8888", +} +soong_config_bool_variable { + name: "gralloc_hwc_fb_disable_afbc", +} +soong_config_bool_variable { + name: "gralloc_camera_write_raw16", +} + +arm_gralloc_cc_defaults { + name: "arm_gralloc_defaults", + owner: "arm", + vendor: true, + proprietary: true, + cflags: [ + "-ldl", + "-Wundef", + "-Werror", + "-DGRALLOC_LIBRARY_BUILD=1", + "-DDISABLE_FRAMEBUFFER_HAL=1", + "-DGRALLOC_USE_LEGACY_CALCS=0", + "-DGRALLOC_USE_LEGACY_LOCK=0", + ], + product_variables: { + platform_sdk_version: { + cflags: ["-DPLATFORM_SDK_VERSION=%d"], + }, + }, + header_libs: [ + "libgralloc_headers", + ], + target: { + android: { + cflags: [ + "-DGRALLOC_HOST_BUILD=0", + ], + }, + host: { + cflags: [ + "-DGRALLOC_HOST_BUILD=1", + ], + }, + }, + soong_config_variables: { + mali_display_version: { + v0: { + cflags: [ + "-DMALI_DISPLAY_VERSION=0", + ], + }, + v500: { + cflags: [ + "-DMALI_DISPLAY_VERSION=500", + ], + }, + v550: { + cflags: [ + "-DMALI_DISPLAY_VERSION=550", + ], + }, + v650: { + cflags: [ + "-DMALI_DISPLAY_VERSION=650", + ], + }, + v71: { + cflags: [ + "-DMALI_DISPLAY_VERSION=71", + ], + }, + }, + gralloc_hwc_force_bgra_8888: { + cflags: [ + "-DGRALLOC_HWC_FORCE_BGRA_8888=1", + ], + }, + gralloc_hwc_fb_disable_afbc: { + cflags: [ + "-DGRALLOC_HWC_FB_DISABLE_AFBC=1", + ], + }, + gralloc_camera_write_raw16: { + cflags: [ + "-DGRALLOC_CAMERA_WRITE_RAW16=1", + ], + }, + }, +} -- cgit v1.2.3