author | Jiyu Yang <jiyu.yang@amlogic.com> | 2016-07-11 10:54:36 (GMT) |
---|---|---|
committer | Tellen Yu <tellen.yu@amlogic.com> | 2016-07-12 08:44:16 (GMT) |
commit | 2b3453433eae2a81264aa611521a4b0b1cdacbc1 (patch) | |
tree | b32938d605653743fed1efcd51ec1f5a2dcc6766 | |
parent | c70094739d784cd76eb545cbe0a8a53f19db0585 (diff) | |
download | gralloc-2b3453433eae2a81264aa611521a4b0b1cdacbc1.zip gralloc-2b3453433eae2a81264aa611521a4b0b1cdacbc1.tar.gz gralloc-2b3453433eae2a81264aa611521a4b0b1cdacbc1.tar.bz2 |
fixed compile error in Android mk for android 7.0
1. fixed compile error in Android mk for android 7.0
2. rm /sys/class/graphics/fb0/osd_afbcd write in gralloc
this is moved to disaply mode setting using systemcontrol
Change-Id: Ia47d4a6442b2406179804b9ab5dad50cc83c9b3a
-rw-r--r-- | Android.mk | 7 | ||||
-rw-r--r-- | framebuffer.cpp | 4 |
2 files changed, 8 insertions, 3 deletions
@@ -52,6 +52,7 @@ else LOCAL_CFLAGS += -DMALI_AFBC_GRALLOC=0 endif +LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) LOCAL_PRELINK_MODULE := false LOCAL_SRC_FILES := framebuffer.cpp LOCAL_MODULE := libfbcnf @@ -96,13 +97,13 @@ else GRALLOC_FB_SWAP_RED_BLUE?=0 MALI_DDK_INCLUDES=$(MALI_LOCAL_PATH)/include $(MALI_LOCAL_PATH)/kernel/include #LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw - ifeq ($(MALI_ION),1) + ifeq ($(MALI_ION),1) ALLOCATION_LIB := libion ALLOCATOR_SPECIFIC_FILES := alloc_ion.cpp gralloc_module_ion.cpp - else + else ALLOCATION_LIB := libGLES_mali ALLOCATOR_SPECIFIC_FILES := alloc_ump.cpp gralloc_module_ump.cpp - endif + endif $(info GRALLOC_FB_SWAP_RED_BLUE1 is $(GRALLOC_FB_SWAP_RED_BLUE)) endif #MALI_AFBC_GRALLOC?=1 diff --git a/framebuffer.cpp b/framebuffer.cpp index c003d8f..4bd17bb 100644 --- a/framebuffer.cpp +++ b/framebuffer.cpp @@ -67,6 +67,7 @@ int bits_per_pixel() return 16; } +#if PLATFORM_SDK_VERSION < 24 #define OSD_AFBCD "/sys/class/graphics/fb0/osd_afbcd" static void write_sys_int(const char *path, int val) @@ -80,6 +81,7 @@ static void write_sys_int(const char *path, int val) close(fd); } } +#endif bool osd_afbcd_enable() { @@ -316,11 +318,13 @@ int init_frame_buffer_locked(struct framebuffer_info_t* fbinfo) int i = 0; char name[64]; +#if PLATFORM_SDK_VERSION < 24 if (osd_afbcd_enable()) { write_sys_int(OSD_AFBCD, 1); } else { write_sys_int(OSD_AFBCD, 0); } +#endif while ((fd == -1) && device_template[i]) { |