summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2017-05-26 22:06:58 -0700
committerJohn Stultz <john.stultz@linaro.org>2017-05-30 12:06:15 -0700
commit51d2a0d970ae4ff1df40aba24208f672b7cb8716 (patch)
tree76d8633c3a563940fe9bd7e4e41d058f31f40df1
parent16100f69b8b4444baa661307c5790eae039a1cc3 (diff)
downloadhikey-51d2a0d970ae4ff1df40aba24208f672b7cb8716.tar.gz
HiKey960: Properly integrate mali bifrost gralloc for HiKey960
This properly integrates the mali bifrost gralloc implementation for HiKey960. This change depends on a pristine libGLES_mali.so which needs an updated arm vendor package. However, after this change, the hisi vendor package is no longer necessary. Change-Id: I7a01911a911525ba6f2dae6cfb0adc1d22412c06 Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--gralloc/Android.mk2
-rw-r--r--gralloc960/Android.hikey960.mk53
-rwxr-xr-xgralloc960/Android.mk10
-rw-r--r--hikey960/device-hikey960.mk2
4 files changed, 61 insertions, 6 deletions
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
index d843436c..2191b7ea 100644
--- a/gralloc/Android.mk
+++ b/gralloc/Android.mk
@@ -30,7 +30,7 @@ LOCAL_SRC_FILES := \
alloc_device.cpp \
framebuffer_device.cpp
-LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE := gralloc.hikey
LOCAL_MODULE_RELATIVE_PATH := hw
include $(BUILD_SHARED_LIBRARY)
diff --git a/gralloc960/Android.hikey960.mk b/gralloc960/Android.hikey960.mk
new file mode 100644
index 00000000..a7bb4721
--- /dev/null
+++ b/gralloc960/Android.hikey960.mk
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2016 ARM Limited. All rights reserved.
+#
+# Copyright (C) 2008 The Android Open Source Project
+#
+# 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.
+
+$(info gralloc for hikey960)
+GRALLOC_FB_SWAP_RED_BLUE := 0
+GRALLOC_DEPTH := GRALLOC_32_BITS
+
+# GPU support for AFBC 1.0
+MALI_GPU_SUPPORT_AFBC_BASIC=1
+# GPU support for AFBC 1.1 block split
+MALI_GPU_SUPPORT_AFBC_SPLITBLK=1
+# GPU support for AFBC 1.1 wide block
+MALI_GPU_SUPPORT_AFBC_WIDEBLK=1
+# GPU support for AFBC 1.2 tiled headers
+MALI_GPU_SUPPORT_AFBC_TILED_HEADERS=0
+# GPU support YUV AFBC formats in wide block
+MALI_GPU_USE_YUV_AFBC_WIDEBLK=0
+
+#
+# Software behaviour defines
+#
+
+# Use ION DMA heap for all allocations. Default is system heap.
+GRALLOC_USE_ION_DMA_HEAP=0
+# Use ION Compound heap for all allocations. Default is system heap.
+GRALLOC_USE_ION_COMPOUND_PAGE_HEAP=0
+# Properly initializes an empty AFBC buffer
+GRALLOC_INIT_AFBC=0
+# When enabled, forces display framebuffer format to BGRA_8888
+GRALLOC_FB_SWAP_RED_BLUE=0
+# Disables the framebuffer HAL device. When a hwc impl is available.
+GRALLOC_DISABLE_FRAMEBUFFER_HAL=0
+# When enabled, buffers will never be allocated with AFBC
+GRALLOC_ARM_NO_EXTERNAL_AFBC=0
+# Minimum buffer dimensions in pixels when buffer will use AFBC
+GRALLOC_DISP_W=0
+GRALLOC_DISP_H=0
+# Vsync backend(not used)
+GRALLOC_VSYNC_BACKEND=default
diff --git a/gralloc960/Android.mk b/gralloc960/Android.mk
index d57c728f..9d615f9d 100755
--- a/gralloc960/Android.mk
+++ b/gralloc960/Android.mk
@@ -15,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+ifeq ($(TARGET_PRODUCT),hikey960)
LOCAL_PATH := $(call my-dir)
# Include platform specific makefiles
@@ -141,11 +142,8 @@ LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
-ifeq ($(TARGET_BOARD_PLATFORM),)
-LOCAL_MODULE := gralloc.default
-else
-LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
-endif
+
+LOCAL_MODULE := gralloc.hikey960
LOCAL_MODULE_TAGS := optional
LOCAL_MULTILIB := both
@@ -163,3 +161,5 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE_OWNER := arm
include $(BUILD_SHARED_LIBRARY)
+
+endif
diff --git a/hikey960/device-hikey960.mk b/hikey960/device-hikey960.mk
index 2843b164..6098480f 100644
--- a/hikey960/device-hikey960.mk
+++ b/hikey960/device-hikey960.mk
@@ -27,6 +27,8 @@ PRODUCT_COPY_FILES += $(LOCAL_PATH)/fstab.hikey960:root/fstab.hikey960 \
# Build HiKey960 HDMI audio HAL. Experimental only may not work. FIXME
PRODUCT_PACKAGES += audio.primary.hikey960
+PRODUCT_PACKAGES += gralloc.hikey960
+
PRODUCT_PACKAGES += power.hikey960
# Include vendor binaries