summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2018-03-20 20:35:07 -0700
committerJohn Stultz <john.stultz@linaro.org>2018-03-30 11:05:54 -0700
commit21ad5be341701a645b69bf3292bcc7835673bc29 (patch)
treeefc8ce0d4889403c3abcbc625c8d92997264f360
parente5c5bb3a9332db9a0bf8385aaa06171cc1e03bc9 (diff)
downloadhikey-21ad5be341701a645b69bf3292bcc7835673bc29.tar.gz
gralloc: Fixup r8p1 gralloc to build for hikey
Apply some changes to the r8p1 gralloc code to get it building for hikey and silence warnings. Change-Id: Iaf8dfc13f7922d7ca850acacf2856a9302ed3f09 Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--gralloc/Android.mk16
-rw-r--r--gralloc/alloc_device.cpp4
-rw-r--r--gralloc/gralloc_module.cpp5
3 files changed, 5 insertions, 20 deletions
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
index 61ff7ff1..7f682fc2 100644
--- a/gralloc/Android.mk
+++ b/gralloc/Android.mk
@@ -31,22 +31,9 @@ endif
MALI_DDK_TEST_PATH := hardware/arm/
-LOCAL_MODULE := gralloc.default
+LOCAL_MODULE := gralloc.hikey
#LOCAL_MODULE_TAGS := optional
-# Which DDK are we building for?
-ifeq (,$(wildcard $(MALI_DDK_TEST_PATH)))
-# Mali-T6xx DDK
-MALI_DDK_PATH := vendor/arm/mali6xx
-LOCAL_SHARED_LIBRARIES := liblog libcutils libGLESv1_CM libGLES_mali libion
-
-# All include files are accessed from the DDK root
-DDK_PATH := $(LOCAL_PATH)/../../..
-UMP_HEADERS_PATH := $(DDK_PATH)/kernel/include
-LOCAL_C_INCLUDES := $(DDK_PATH) $(UMP_HEADERS_PATH)
-
-LOCAL_CFLAGS := -DLOG_TAG=\"gralloc\" -DSTANDARD_LINUX_SCREEN -DMALI_600
-else
# Mali-200/300/400MP DDK
MALI_DDK_PATH := hardware/arm/mali
#SHARED_MEM_LIBS := libUMP
@@ -58,7 +45,6 @@ LOCAL_C_INCLUDES := system/core/include/ $(MALI_DDK_PATH)/include
LOCAL_C_INCLUDES += $(MALI_DDK_PATH)/src/ump/include
LOCAL_CFLAGS := -DLOG_TAG=\"gralloc\" -DGRALLOC_32_BITS -DSTANDARD_LINUX_SCREEN -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
-endif
LOCAL_SRC_FILES := \
gralloc_module.cpp \
diff --git a/gralloc/alloc_device.cpp b/gralloc/alloc_device.cpp
index 1bb712f5..ddd41940 100644
--- a/gralloc/alloc_device.cpp
+++ b/gralloc/alloc_device.cpp
@@ -568,7 +568,7 @@ static int alloc_device_alloc(alloc_device_t *dev, int w, int h, int format, int
return 0;
}
-static int alloc_device_free(alloc_device_t *dev, buffer_handle_t handle)
+static int alloc_device_free(alloc_device_t __unused *dev, buffer_handle_t handle)
{
if (private_handle_t::validate(handle) < 0)
{
@@ -606,8 +606,6 @@ static int alloc_device_free(alloc_device_t *dev, buffer_handle_t handle)
else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION)
{
#if GRALLOC_ARM_DMA_BUF_MODULE
- private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module);
-
/* Buffer might be unregistered so we need to check for invalid ump handle*/
if (0 != hnd->base)
{
diff --git a/gralloc/gralloc_module.cpp b/gralloc/gralloc_module.cpp
index 20f833d7..84054736 100644
--- a/gralloc/gralloc_module.cpp
+++ b/gralloc/gralloc_module.cpp
@@ -18,7 +18,9 @@
#include <errno.h>
#include <pthread.h>
-#include <sync/sync.h>
+#include <string.h>
+//#include <sync/sync.h>
+#include <android/sync.h>
#include <cutils/log.h>
#include <cutils/atomic.h>
@@ -136,7 +138,6 @@ static int gralloc_register_buffer(gralloc_module_t const *module, buffer_handle
else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION)
{
#if GRALLOC_ARM_DMA_BUF_MODULE
- int ret;
unsigned char *mappedAddress;
size_t size = hnd->size;
hw_module_t *pmodule = NULL;